]> git.proxmox.com Git - qemu-server.git/commitdiff
refactor do_snapshots_with_qemu a bit cleaner
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 4 Jun 2019 15:40:42 +0000 (17:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 4 Jun 2019 15:41:23 +0000 (17:41 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index 1a22fb475b680166d5315cedb37791909e1f2015..ff593a6ecd394e055ecd6313139698b951aaae35 100644 (file)
@@ -6606,9 +6606,9 @@ sub do_snapshots_with_qemu {
     my ($storecfg, $volid) = @_;
 
     my $storage_name = PVE::Storage::parse_volume_id($volid);
+    my $scfg = $storecfg->{ids}->{$storage_name};
 
-    if ($qemu_snap_storage->{$storecfg->{ids}->{$storage_name}->{type}}
-       && !$storecfg->{ids}->{$storage_name}->{krbd}){
+    if ($qemu_snap_storage->{$scfg->{type}} && !$scfg->{krbd}){
        return 1;
     }