On Fri, 27 Mar 2026 11:12:43 +0800 Li Wang <[email protected]> wrote:
> hugetlb_dio test uses sub-page offsets (pagesize / 2) to verify that
> hugepages used as DIO user buffers are correctly unpinned at completion.
>
> However, on filesystems with a logical block size larger than half the
> page size (e.g., 4K-sector block devices), these unaligned DIO writes
> are rejected with -EINVAL, causing the test to fail unexpectedly.
>
> Add check_dio_alignment() which queries the filesystem's DIO alignment
> requirement via statx(STATX_DIOALIGN) and skips the test early if the
> sub-page offset used by the test is not compatible with the alignment
> constraint.
AI review askes questions:
https://sashiko.dev/#/patchset/[email protected]
The glibc one is worthwhile, I suppose. glibc-2.37 was released Feb
2023.
I'd ignore the filesystem-doesn't-support-directio ones. If someone's
running a dio test against such a filesystem then Don't Do That.
And yes please, %zu.