public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH storage] plugin: rbd: export: skip 'rbd du' when querying the size
@ 2026-10-21 12:21 Kefu Chai
  0 siblings, 0 replies; only message in thread
From: Kefu Chai @ 2026-10-21 12:21 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-21 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 12:21 [PATCH storage] plugin: rbd: export: skip 'rbd du' when querying the size Kefu Chai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal