]> git.proxmox.com Git - qemu-server.git/commitdiff
followup; shorter code for efidisk rbd cache handling
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 16 Jun 2021 13:17:58 +0000 (15:17 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 16 Jun 2021 13:18:03 +0000 (15:18 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

index 96375c3edc386c08612150b119a06a5de3bdde70..6845966590eb514995cc18c9662b8b5ed16dae73 100644 (file)
@@ -3307,13 +3307,8 @@ sub config_to_command {
            $size_str = ",size=" . (-s $ovmf_vars);
        }
 
-       # on slower ceph clusters, booting without cache on efidisk can take a while.
-       # enable cache by default, should not be harmful since it's only the efidisk
-       # see #3329
-       my $cache = "";
-       if ($path =~ m/^rbd:/) {
-           $cache = ',cache=writeback';
-       }
+       # on slower ceph clusters, booting without cache on efidisk can take a while, see #3329
+       my $cache = $path =~ m/^rbd:/ ? ',cache=writeback' : '';
 
        push @$cmd, '-drive', "if=pflash,unit=0,format=raw,readonly=on,file=$ovmf_code";
        push @$cmd, '-drive', "if=pflash,unit=1$cache,format=$format,id=drive-efidisk0$size_str,file=$path";