]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
ext4/021: Work with 64k block size
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Fri, 23 Nov 2018 05:59:30 +0000 (11:29 +0530)
committerEryu Guan <guaneryu@gmail.com>
Fri, 23 Nov 2018 07:13:03 +0000 (15:13 +0800)
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>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/ext4/021

index 3d36efd0f2a079f238756d1f2ef2ba21d32b80f5..519737e18d4a60027f2b1c4568a12e804ac0cc45 100755 (executable)
@@ -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