[pve-devel] [PATCH kernel/manager 0/5] fix #5430: ocfs2 io_uring read

Daniel Kral d.kral at proxmox.com
Wed Oct 16 18:47:06 CEST 2024


Since around Linux kernel version 6.7 [0], and as reported by users
kernel version `6.8.4-2-pve`, a bug was introduced by a refactoring of
the io_read function in the io_uring subsystem. This causes any VM to
fail to start, when io_uring is used for CDROM drives (including
CloudInit drives) and VM disks (even though I could not reproduce the
latter).

This patch series contains the following three changes to fix this:

1. a recent (mainlined) patch that fixes the bug in io_uring (#1),
2. allow changes to aio/cache options for CDROMs in the GUI (#2-3),
3. allow changes to aio/cache options for CloudInit in the GUI (#4-5).


# pve-kernel (patch #1)

I have tested the pve-kernel patch by testing the kernel "side-by-side"
(reboot between unpatched and patched 6.8.12-2-pve kernel) with a local
minimal ocfs2 setup, which I setup in PVE as a regular directory storage
with a non-PVE-managed mountpoint:

```
apt install ocfs2-tools
mkfs.ocfs2 /dev/sde
o2cb add-cluster ocfs2test
o2cb add-node ocfs2test <hostname> --ip <local-ip>
echo "kernel.panic_on_oops = 1" > /etc/sysctl.conf
echo "kernel.panic = 30" > /etc/sysctl.conf
o2cb register-cluster ocfs2test
mkdir -p /mnt/ocfs2test
mount /dev/sde /mnt/ocfs2test
pvesm add dir ocfs2test --path /mnt/ocfs2test --is_mountpoint yes
`

The patched kernel successfully fixed the described issue with ocfs2 for
CDROM images and CloudInit drive images in any format. I also tested the
same for a few other storages using io_uring (ZFS, NFS and ext4) and
there were no regressions on my side.


# pve-manager (patch #2 - #5)

The last two UI changes are an optional part that was discussed off-list
as a solution before I knew about the kernel patch and I would still
propose it as a useful set of changes.

These changes allow users to change the cache and async I/O options for
both CDROM and CloudInit drives. These changes are not necessary for the
whole patch series and can be applied separately, or dropped.

Another discussion to this patch series - as Shannon and Fabian have
mentioned to me off-list - was if there are actual benefits for CDROM
and CloudInit drives to be read with io_uring enabled.

[0] This is the commit hash that was mentioned as the bug cause:

```
# git describe --contains a08d195b586a217d76b42062f88f375a3eedda4d
v6.7-rc1~139^2~14
```

pve-kernel:

Daniel Kral (1):
  fix #5430: cherry-pick fix for ocfs2 io_uring rw issues

 ...t-EOPNOTSUPP-for-IOCB_NOWAIT-like-EA.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 patches/kernel/0021-io_uring-rw-treat-EOPNOTSUPP-for-IOCB_NOWAIT-like-EA.patch


pve-manager:

Daniel Kral (4):
  ui: vm: factor out async I/O type selector
  fix #5430: ui: vm: add aio and cache selectors to edit panel
  ui: vm: make cloudinit drive editable
  fix #5430: ui: vm: allow editing cloudinit aio and cache options

 www/manager6/Makefile                    |   1 +
 www/manager6/form/AsyncIOTypeSelector.js |  10 ++
 www/manager6/qemu/CDEdit.js              |  30 +++++-
 www/manager6/qemu/CIDriveEdit.js         | 114 ++++++++++++++++++-----
 www/manager6/qemu/HDEdit.js              |  10 +-
 www/manager6/qemu/HardwareView.js        |   4 +-
 6 files changed, 136 insertions(+), 33 deletions(-)
 create mode 100644 www/manager6/form/AsyncIOTypeSelector.js


Summary over all repositories:
  7 files changed, 181 insertions(+), 33 deletions(-)

-- 
Generated by git-murpp 0.7.2




More information about the pve-devel mailing list