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>