mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: Introduce get_block_size() helper
Currently many tests and other functions uses it's own way to get block size of the file system. Introduce get_block_size(), a generic way to get block size of mounted file system and use that instead. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
48c45430ce
commit
a2a1fc679e
+1
-1
@@ -62,7 +62,7 @@ rm -f $seqres.full
|
||||
rm -f $TEST_DIR/aiodio_sparse
|
||||
|
||||
logical_block_size=`_min_dio_alignment $TEST_DEV`
|
||||
fs_block_size=`stat -f $TEST_DIR | grep "Block size:" | awk '{print $3}'`
|
||||
fs_block_size=`get_block_size $TEST_DIR`
|
||||
file_size=$((8 * $fs_block_size))
|
||||
|
||||
if [ $fs_block_size -le $logical_block_size ]; then
|
||||
|
||||
Reference in New Issue
Block a user