From: Kefu Chai <k.chai@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH storage] plugin: rbd: export: skip 'rbd du' when querying the size
Date: Wed, 21 Oct 2026 20:21:11 +0800 [thread overview]
Message-ID: <20261021122111.4181795-1-k.chai@proxmox.com> (raw)
volume_export() only needs the image size, but it calls
volume_size_info() in list context. In that context volume_size_info()
also runs 'rbd du' to get the used space, which walks every object on
images without fast-diff. The export then never uses the result.
Call it in scalar context.
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
src/PVE/Storage/RBDPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Storage/RBDPlugin.pm b/src/PVE/Storage/RBDPlugin.pm
index 2d1d7a6..b5e82c7 100644
--- a/src/PVE/Storage/RBDPlugin.pm
+++ b/src/PVE/Storage/RBDPlugin.pm
@@ -1016,7 +1016,7 @@ sub volume_export {
die "cannot export volumes together with their snapshots in $class\n" if $with_snapshots;
die "cannot export an incremental stream in $class\n" if defined($base_snapshot);
- my ($size) = $class->volume_size_info($scfg, $storeid, $volname);
+ my $size = $class->volume_size_info($scfg, $storeid, $volname);
PVE::Storage::Plugin::write_common_header($fh, $size);
my $cmd = $rbd_cmd->($scfg, $storeid, 'export', '--export-format', '1', $volname, '-');
run_rbd_command(
--
2.47.3
reply other threads:[~2026-10-21 12:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261021122111.4181795-1-k.chai@proxmox.com \
--to=k.chai@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox