On 22.09.2026 18:43, Stefan Hajnoczi wrote:
Linux v6.1 commit 825cf206ed51 ("statx: add direct I/O alignment information") added an interface to fetch O_DIRECT alignment values for block devices and file systems.Prefer STATX_DIOALIGN to older interfaces and probing, but keep them as fallbacks in case STATX_DIOALIGN cannot provide the information. STATX_DIOALIGN support as of Linux 6.1: - btrfs: no - ext4: yes - XFS: yes - block devices: yes - dm-crypt: yes This change fixes #1290 ("IO alignment probing delivers incorrect results on Linux when used with e.g. dm-crypt") on Linux host kernel version 6.1 or later by avoiding the problematic probing code in raw_probe_alignment(). It would be nice to fix the probing code but I have not been able to reproduce it. Stable/LTS distros ship Linux 6.1+, so the number of users without STATX_DIOALIGN is becoming small. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/1290 Cc: Eric Biggers <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
I'm picking this up for the currently active qemu stable series too, it should be a nice addition there. Thanks, /mjt
