From: Anand Jain Date: Tue, 25 Sep 2018 04:24:14 +0000 (+0800) Subject: btrfs: _scratch_mkfs_sized fix min size without mixed option X-Git-Tag: v2022.05.01~1396 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50c1905c2795441aff5ec02fcd268eb194e2af35;p=xfstests-dev.git btrfs: _scratch_mkfs_sized fix min size without mixed option As of now _scratch_mkfs_sized() checks if the requested size is below 1G and forces the --mixed option for the mkfs.btrfs. Well the correct size considering all possible group profiles at which we need to force the mixed option is roughly 256Mbytes. So fix that. Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index d5bb1fee..90dc3002 100644 --- a/common/rc +++ b/common/rc @@ -969,7 +969,10 @@ _scratch_mkfs_sized() ;; btrfs) local mixed_opt= - (( fssize <= 1024 * 1024 * 1024 )) && mixed_opt='--mixed' + # minimum size that's needed without the mixed option. + # Ref: btrfs-prog: btrfs_min_dev_size() + # Non mixed mode is also the default option. + (( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed' $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV ;; jfs)