diff mbox series

[2/2] ext4/021: Work with 64k block size

Message ID 20181123055930.21423-2-chandan@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ext4/002: Work with 64k block size | expand

Commit Message

Chandan Rajendra Nov. 23, 2018, 5:59 a.m. UTC
For 64k blocksize, 10MiB as the filesystem size isn't sufficient to have
a journal included. Hence this commit computes the test FS size based on
the block size of the underlying filesystem.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
---
 tests/ext4/021 | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tests/ext4/021 b/tests/ext4/021
index 3d36efd0..519737e1 100755
--- a/tests/ext4/021
+++ b/tests/ext4/021
@@ -34,13 +34,16 @@  _supported_os Linux
 _require_scratch
 _require_dumpe2fs
 
-# 10M in bytes
-fssize=$((10 * 1024 * 1024))
+_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mount
+blocksize=$(_get_block_size $SCRATCH_MNT)
+_scratch_unmount
+
+# With 4k block size, this amounts to 10M FS instance.
+fssize=$((2560 * $blocksize))
 _scratch_mkfs_sized $fssize >> $seqres.full 2>&1
 _require_metadata_journaling $SCRATCH_DEV
 
-blocksize=`$DUMPE2FS_PROG -h $SCRATCH_DEV 2>/dev/null | grep "Block size" | \
-	awk '{print $3}'`
 offset=0
 found=0
 # this is the jbd2 journal superblock magic number on disk, in big endian