shared/289: do not special-case ext3
authorEryu Guan <eguan@redhat.com>
Mon, 4 May 2015 12:56:13 +0000 (22:56 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 4 May 2015 12:56:13 +0000 (22:56 +1000)
Commit "3574531 xfstests: count journal size in test 289" makes ext3 a
special case, but now it's not the case anymore after kernel commit

2046fd1 ext3: Count journal as bsddf overhead in ext3_statfs

So just remove the special case, now test passes on both ext3 and ext4,
also ext3 driven by ext4 module.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/shared/289

index c53d38ce3d1364cd05a4fbea2db63ed0cc8c0189..96c949d44cb9867177b3f939da35dbee54770172 100755 (executable)
@@ -58,18 +58,7 @@ TOTAL_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
 FREE_BLOCKS=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
                | awk '/Free blocks:/{print $3}'`
 
-# ext3 doesn't count journal blocks as overhead, ext4 does.
-if [ $FSTYP = "ext3" ]; then
-       JOURNAL_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
-               | awk '/Journal size:/{print $3}' | _filter_size_to_bytes`
-       BLOCK_SIZE=`dumpe2fs -h $SCRATCH_DEV 2>/dev/null \
-               | awk '/Block size:/{print $3}'`
-       JOURNAL_BLOCKS=$(($JOURNAL_SIZE/$BLOCK_SIZE))
-else
-       JOURNAL_BLOCKS=0
-fi
-
-OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS-$JOURNAL_BLOCKS))
+OVERHEAD=$(($TOTAL_BLOCKS-$FREE_BLOCKS))
 
 #  bsddf|minixdf
 #         Set the behaviour  for  the  statfs  system  call.  The  minixdf