From: Christoph Hellwig Date: Sun, 3 Sep 2017 15:51:01 +0000 (+0200) Subject: xfs/310: relax extent count check X-Git-Tag: v2022.05.01~1863 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b88444413a0f6b10942cde1a6b4e22b863f8ebf2;p=users%2Fhch%2Fxfstests-dev.git xfs/310: relax extent count check If we got over the bmbt length we'll always allocate two extents, its just that so far getbmap merged them. Also fix/update some comments. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/310 b/tests/xfs/310 index c78f6f11e..f33a15ad0 100755 --- a/tests/xfs/310 +++ b/tests/xfs/310 @@ -1,7 +1,7 @@ #! /bin/bash # FS QA Test No. 310 # -# Create a file with more than 2^21 extents (the max length of a bmbt record). +# Create a file with more than 2^21 blocks (the max length of a bmbt record). # #----------------------------------------------------------------------- # Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved. @@ -75,8 +75,9 @@ mkdir $testdir blksz="$(_get_block_size $testdir)" $XFS_IO_PROG -f -c "falloc 0 $((nr_blks * blksz))" $testdir/file1 >> $seqres.full +# make sure the allocator didn't allocate more than the needed two extents echo "Check extent count" -xfs_bmap -l -p -v $testdir/file1 | grep '^[[:space:]]*1:' -q && xfs_bmap -l -p -v $testdir/file1 +xfs_bmap -l -p -v $testdir/file1 | grep '^[[:space:]]*2:' -q && xfs_bmap -l -p -v $testdir/file1 inum=$(stat -c '%i' $testdir/file1) umount $SCRATCH_MNT