add STATX_DIO_READ_ALIGN

Christoph Hellwig
2025-01-06T15:16:16Z

Hi all,

file systems that write out of place usually require different alignment
for direct I/O writes than what they can do for reads. This series tries
to address this by yet another statx field.

Note that the code is completely untested - I wrote it and got preempted
and only sent this out because Hongbo Li brought the issue up in the
nilfs2 context. I've just started a vacation so I'm unlikely to get
back to it any time soon, but if someone wants to take the work over
go for it. I'll probably answer to email at least every other day or
so.

Changes from RFC:
- add a cleanup patch for xfs_vn_getattr
- use xfs_inode_alloc_unitsize in xfs_vn_getattr
- improve a comment in XFS

Diffstat:
fs/stat.c | 1
fs/xfs/xfs_iops.c | 65 +++++++++++++++++++-----------
include/linux/stat.h | 1
include/uapi/linux/stat.h | 99 ++++++++++++++++++++++++++++++++++------------
4 files changed, 118 insertions(+), 48 deletions(-)