various: replace _get_block_size with _get_file_block_size when needed
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Oct 2020 19:01:56 +0000 (12:01 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 8 Nov 2020 09:22:06 +0000 (17:22 +0800)
commitb951bb5cef511eb49cf2ec846ddb63259f106555
tree7d96a6230efd9f3dea2344ed7149ec398b6ad4cc
parent826016f2261eb5de28e032e3c8579aae263612be
various: replace _get_block_size with _get_file_block_size when needed

The _get_file_block_size helper was added so that tests could find out
the size of a fundamental unit of allocation for a given file, which is
necessary for certain fallocate and clonerange tests.

On certain filesystem configurations (ocfs2 with clusters, xfs with a
large rt extent size), this is /not/ the same as the filesystem block
size, and these tests will fail.  Fix them to use the correct helper.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/328