]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/104: don't enospc when ag metadata overhead grows
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 May 2016 05:57:08 +0000 (22:57 -0700)
committerEryu Guan <eguan@redhat.com>
Wed, 15 Jun 2016 07:44:49 +0000 (15:44 +0800)
Adapt to different metadata overhead sizes by trying to reserve
decreasing amounts of disk space until we actually succeed at it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/104

index 17f9b629ea793ed73d4fc149e8d25ff1f6ebd252..785027e4c7fbc1d952d75c2bd78353ca26880e1b 100755 (executable)
@@ -88,9 +88,14 @@ sizeb=`expr $size / $dbsize` # in data blocks
 echo "*** creating scratch filesystem"
 _create_scratch -lsize=10m -dsize=${size} -dagcount=${nags}
 
-fillsize=`expr 110 \* 1048576` # 110 megabytes of filling
 echo "*** using some initial space on scratch filesystem"
-_fill_scratch $fillsize
+for i in `seq 125 -1 90`; do
+       fillsize=`expr $i \* 1048576`
+       out="$(_fill_scratch $fillsize 2>&1)"
+       echo "$out" | grep -q 'No space left on device' && continue
+       test -n "${out}" && echo "$out"
+       break
+done
 
 #
 # Grow the filesystem while actively stressing it...