From 26d717252aa0579b422c5878b3345839a073519d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 16 Jun 2021 15:17:58 +0200 Subject: [PATCH] followup; shorter code for efidisk rbd cache handling Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 96375c3e..68459665 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -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"; -- 2.39.5