seek_sanity_test: use XFS ioctls to determine file allocation unit size v2022.07.31
authorDarrick J. Wong <djwong@kernel.org>
Thu, 28 Jul 2022 18:17:26 +0000 (11:17 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 31 Jul 2022 14:06:46 +0000 (22:06 +0800)
commitb91889d79e1d92e22860504e40108a2e4d054c33
tree57863fcb059d7bcf0ad75710c132296287e2a1d6
parent91f2a0f472e6a247a68b00585871ac5e247543e1
seek_sanity_test: use XFS ioctls to determine file allocation unit size

liuyd.fnst@fujitsu.com reported that my recent change to the seek sanity
test broke NFS.  I foolishly thought that st_blksize was sufficient to
find the file allocation unit size so that applications could figure out
the SEEK_HOLE granularity.  Replace that with an explicit callout to XFS
ioctls so that xfs realtime will work again.

Fixes: e861a302 ("seek_sanity_test: fix allocation unit detection on XFS realtime")
Reported-by: liuyd.fnst@fujitsu.com
Tested-by: liuyd.fnst@fujitsu.com
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
src/seek_sanity_test.c