btrfs/149: make it sectorsize independent

Originally this test case was designed to work with 4K sectorsize.
Now enhance it to work with any sector sizes and makes the following
changes:
.out file not to contain any traces of sector size.
Use max_inline=0 mount option so that it meets the requisite of non inline
regular extent.
Don't log the md5sum results to the output file as the data size vary by
the sectorsize.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Anand Jain
2018-09-16 18:52:08 +08:00
committed by Eryu Guan
parent 29b2f63b3e
commit cc8831f9a5
4 changed files with 46 additions and 23 deletions
+7
View File
@@ -367,3 +367,10 @@ _run_btrfs_balance_start()
run_check $BTRFS_UTIL_PROG balance start $bal_opt $*
}
#return the sector size of the btrfs scratch fs
_scratch_btrfs_sectorsize()
{
$BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV |\
grep sectorsize | awk '{print $2}'
}