* [PATCH storage] plugin: rbd: export: skip 'rbd du' when querying the size
@ 2026-10-21 12:21 Kefu Chai
2026-10-28 19:33 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* applied: [PATCH storage] plugin: rbd: export: skip 'rbd du' when querying the size
2026-10-21 12:21 [PATCH storage] plugin: rbd: export: skip 'rbd du' when querying the size Kefu Chai
@ 2026-10-28 19:33 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-10-28 19:33 UTC (permalink / raw)
To: pve-devel, Kefu Chai
On Wed, 21 Oct 2026 20:21:11 +0800, Kefu Chai wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] plugin: rbd: export: skip 'rbd du' when querying the size
https://git.proxmox.com/?p=pve-storage.git;a=commitdiff;h=a8ee8394bf6cbd340e1494f39d9f599553a1d141
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-28 19:34 UTC | newest]
Thread overview: 2+ messages (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
2026-10-28 19:33 ` applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.