mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-08 21:18:03 +03:00
fix #3329: turn on cache=writeback for efidisks on rbd
on slower ceph clusters, the write pattern of the ovmf booting process slows down the boot of the vm, so we turn on caching by default it seems no other storage (until now) behaves like this. if it does in the future, we can still add them too, or add a 'cache' property for the efidisk Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
16e66777a0
commit
6aaad2306d
@ -3307,8 +3307,16 @@ 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';
|
||||
}
|
||||
|
||||
push @$cmd, '-drive', "if=pflash,unit=0,format=raw,readonly=on,file=$ovmf_code";
|
||||
push @$cmd, '-drive', "if=pflash,unit=1,format=$format,id=drive-efidisk0$size_str,file=$path";
|
||||
push @$cmd, '-drive', "if=pflash,unit=1$cache,format=$format,id=drive-efidisk0$size_str,file=$path";
|
||||
}
|
||||
|
||||
# load q35 config
|
||||
|
Loading…
Reference in New Issue
Block a user