[pve-devel] [PATCH v2 qemu-server 2/2] migrate: add size to volume attributes
Tim Marx
t.marx at proxmox.com
Fri Jun 28 15:13:47 CEST 2019
Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
PVE/QemuServer.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 1f3234f..35e2633 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3334,7 +3334,7 @@ sub foreach_volid {
my $volhash = {};
my $test_volid = sub {
- my ($volid, $is_cdrom, $replicate, $shared, $snapname) = @_;
+ my ($volid, $is_cdrom, $replicate, $shared, $snapname, $size) = @_;
return if !$volid;
@@ -3352,11 +3352,12 @@ sub foreach_volid {
$volhash->{$volid}->{referenced_in_snapshot}->{$snapname} = 1
if defined($snapname);
+ $volhash->{$volid}->{size} = $size if $size;
};
foreach_drive($conf, sub {
my ($ds, $drive) = @_;
- $test_volid->($drive->{file}, drive_is_cdrom($drive), $drive->{replicate} // 1, $drive->{shared}, undef);
+ $test_volid->($drive->{file}, drive_is_cdrom($drive), $drive->{replicate} // 1, $drive->{shared}, undef, $drive->{size});
});
foreach my $snapname (keys %{$conf->{snapshots}}) {
--
2.11.0
More information about the pve-devel
mailing list