]> git.proxmox.com Git - qemu-server.git/commitdiff
cfg2cmd: avoid io_uring with LVM and write{back, through} cache
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 7 Jul 2021 11:28:35 +0000 (13:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jul 2021 12:55:17 +0000 (14:55 +0200)
Reported in the community forum[0]. Also tried with LVM-thin, but it
doesn't seem to be affected.

See also 628937f53acde52f7257ca79f574c87a45f392e7 for the same fix for
krbd.

[0]: https://forum.proxmox.com/threads/after-upgrade-to-7-0-all-vms-dont-boot.92019/post-401017

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuServer.pm

index 8fc90e26b3baf871215e3d6ae2c719d502d2ef3e..b0fe257b819d5c1efaf4221640ca340815d240db 100644 (file)
@@ -1605,8 +1605,11 @@ sub print_drive_commandline_full {
     # io_uring with cache mode writeback or writethrough on krbd will hang...
     my $rbd_no_io_uring = $scfg && $scfg->{type} eq 'rbd' && $scfg->{krbd} && !$cache_direct;
 
+    # io_uring with cache mode writeback or writethrough on LVM will hang...
+    my $lvm_no_io_uring = $scfg && $scfg->{type} eq 'lvm' && !$cache_direct;
+
     if (!$drive->{aio}) {
-       if ($io_uring && !$rbd_no_io_uring) {
+       if ($io_uring && !$rbd_no_io_uring && !$lvm_no_io_uring) {
            # io_uring supports all cache modes
            $opts .= ",aio=io_uring";
        } else {