[pve-devel] [PATCH qemu-server 2/3] migrate: fix auto-vivification in cleanup_bitmaps

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Mar 26 15:42:58 CET 2020


this does not currently trigger since nothing uses $self->{target_drive}
afterwards.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    new in v2
    
    triggered by v2 of next patch

 PVE/QemuMigrate.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index b14ee01..9ded16c 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -554,7 +554,7 @@ sub cleanup_remotedisks {
 
 sub cleanup_bitmaps {
     my ($self) = @_;
-    foreach my $drive (%{$self->{target_drive}}) {
+    foreach my $drive (keys %{$self->{target_drive}}) {
 	my $bitmap = $self->{target_drive}->{$drive}->{bitmap};
 	next if !$bitmap;
 	$self->log('info', "$drive: removing block-dirty-bitmap '$bitmap'");
-- 
2.20.1





More information about the pve-devel mailing list