* [pve-devel] [PATCH v2 qemu-server] fix #4099: disable io_uring for virtual disks on CIFS storages
@ 2022-10-27 7:13 Fiona Ebner
2022-10-28 8:18 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2022-10-27 7:13 UTC (permalink / raw)
To: pve-devel
Since kernel 5.15, there is an issue with io_uring when used in
combination with CIFS [0]. Unfortunately, the kernel developers did
not suggest any way to resolve the issue and didn't comment on my
proposed one. So for now, just disable io_uring when the storage is
CIFS, like is done for other storage types that had problematic
interactions.
It is rather easy to reproduce when writing large amounts of data
within the VM. I used
dd if=/dev/urandom of=file bs=1M count=1000
to reproduce it consistently, but your mileage may vary.
Some forum reports about users running into the issue [1][2][3].
[0]: https://www.spinics.net/lists/linux-cifs/msg26734.html
[1]: https://forum.proxmox.com/threads/109848/
[2]: https://forum.proxmox.com/threads/110464/
[3]: https://forum.proxmox.com/threads/111382/
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
Changes from v1:
* Add 'fix #4099'-prefix to commit title.
PVE/QemuServer.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4e85dd02..513a248f 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1665,8 +1665,12 @@ sub print_drive_commandline_full {
# sometimes, just plain disable...
my $lvm_no_io_uring = $scfg && $scfg->{type} eq 'lvm';
+ # io_uring causes problems when used with CIFS since kernel 5.15
+ # Some discussion: https://www.spinics.net/lists/linux-cifs/msg26734.html
+ my $cifs_no_io_uring = $scfg && $scfg->{type} eq 'cifs';
+
if (!$drive->{aio}) {
- if ($io_uring && !$rbd_no_io_uring && !$lvm_no_io_uring) {
+ if ($io_uring && !$rbd_no_io_uring && !$lvm_no_io_uring && !$cifs_no_io_uring) {
# io_uring supports all cache modes
$opts .= ",aio=io_uring";
} else {
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH v2 qemu-server] fix #4099: disable io_uring for virtual disks on CIFS storages
2022-10-27 7:13 [pve-devel] [PATCH v2 qemu-server] fix #4099: disable io_uring for virtual disks on CIFS storages Fiona Ebner
@ 2022-10-28 8:18 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-10-28 8:18 UTC (permalink / raw)
To: Proxmox VE development discussion, Fiona Ebner
On 27/10/2022 09:13, Fiona Ebner wrote:
> Since kernel 5.15, there is an issue with io_uring when used in
> combination with CIFS [0]. Unfortunately, the kernel developers did
> not suggest any way to resolve the issue and didn't comment on my
> proposed one. So for now, just disable io_uring when the storage is
> CIFS, like is done for other storage types that had problematic
> interactions.
>
> It is rather easy to reproduce when writing large amounts of data
> within the VM. I used
> dd if=/dev/urandom of=file bs=1M count=1000
> to reproduce it consistently, but your mileage may vary.
>
> Some forum reports about users running into the issue [1][2][3].
>
> [0]: https://www.spinics.net/lists/linux-cifs/msg26734.html
> [1]: https://forum.proxmox.com/threads/109848/
> [2]: https://forum.proxmox.com/threads/110464/
> [3]: https://forum.proxmox.com/threads/111382/
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>
> Changes from v1:
> * Add 'fix #4099'-prefix to commit title.
>
> PVE/QemuServer.pm | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>
really unfortunate indeed though, a kernel fix would be nicer,
but there's only so much time we can spent waiting on progress
there, so ...
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-28 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 7:13 [pve-devel] [PATCH v2 qemu-server] fix #4099: disable io_uring for virtual disks on CIFS storages Fiona Ebner
2022-10-28 8:18 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox