On 2018/9/24 下午6:16, Anand Jain wrote:
> As of now _scratch_mkfs_sized check if the requested size is below 1G
> and forces the --mixed option for the mkfs.btrfs. Well the correct size
> at which we need to force the mixed option is 114294784bytes. Fix that.

How this size is get from?
If it's from btrfs_min_dev_size(), I strongly recommend to add reference
here, and don't use the ugly intermediate number.


BTW, this number is related to mkfs profile.
If you really want to use some maximum number, please follow the max
possible value in btrfs_min_dev_size(), which should be 229M other than
106M.

Thanks,
Qu

> 
> Signed-off-by: Anand Jain <anand.j...@oracle.com>
> ---
>  common/rc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index d5bb1feee2c3..bcdbf03e1bf0 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -969,7 +969,9 @@ _scratch_mkfs_sized()
>       ;;
>      btrfs)
>       local mixed_opt=
> -     (( fssize <= 1024 * 1024 * 1024 )) && mixed_opt='--mixed'
> +     # minimum size that's needed without the mixed option.
> +     # Non mixed mode is also the default option.
> +     (( fssize < 114294784 )) && mixed_opt='--mixed'
>       $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV
>       ;;
>      jfs)
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to