mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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>
This commit is contained in:
committed by
Eryu Guan
parent
826016f226
commit
b951bb5cef
+1
-1
@@ -48,7 +48,7 @@ mkdir "$testdir"
|
||||
# 2^10 blocks... that should be plenty for anyone.
|
||||
fnr=$((12 + LOAD_FACTOR))
|
||||
free_blocks=$(stat -f -c '%a' "$testdir")
|
||||
blksz=$(_get_block_size $testdir)
|
||||
blksz=$(_get_file_block_size $testdir)
|
||||
space_avail=$((free_blocks * blksz))
|
||||
calc_space()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user