]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: implement XFS_IOC_DIOINFO in terms of vfs_getattr
authorChristoph Hellwig <hch@lst.de>
Mon, 25 Aug 2025 11:15:00 +0000 (13:15 +0200)
committerCarlos Maiolino <cem@kernel.org>
Thu, 28 Aug 2025 12:20:03 +0000 (14:20 +0200)
commit851c4c96db001f51bdad1432aa54549c7fe2c63e
treed8541886a2ebfbd3dac827019da96594ea17fee4
parent0239bd9fa445a21def88f7e76fe6e0414b2a4da0
xfs: implement XFS_IOC_DIOINFO in terms of vfs_getattr

Use the direct I/O alignment reporting from ->getattr instead of
reimplementing it.  This exposes the relaxation of the memory
alignment in the XFS_IOC_DIOINFO info and ensure the information will
stay in sync.  Note that randholes.c in xfstests has a bug where it
incorrectly fails when the required memory alignment is smaller than the
pointer size.  Round up the reported value as there is a fair chance that
this code got copied into various applications.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_ioctl.c