On 26.09.2018 07:07, Anand Jain wrote:
>
>
> On 09/25/2018 06:51 PM, Nikolay Borisov wrote:
>>
>>
>> On 25.09.2018 07:24, Anand Jain wrote:
>>> 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 <anand.jain@xxxxxxxxxx>
>>
>> Have you considered the implications of this w.r.t commit
>> d4da414a9a9d ("common/rc: raise btrfs mixed mode threshold to 1GB")
>>
>> Initially this threshold was 100mb then Omar changed it to 1g. Does this
>> change affect generic/427?
>
> d4da414a9a9d does not explain what was the problem that Omar wanted to
> address, mainly what was the failure about.
I just retested on upstream 4.19.0-rc3 with Omar's patch reverted (so
anything above 100m for fs size is created with non-mixed block groups)
and the test succeeded. So indeed your change seems to not make a
difference for this test.
>
> And no it does not affect. I have verified generic/427 with kernel 4.1
> and 4.19-rc5 with btrfs-progs 4.1, 4.9 and latest from kdave they all
> run fine. Good to integrate.
>
> Thanks, Anand
>
>>
>>> ---
>>> common/rc | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/common/rc b/common/rc
>>> index d5bb1feee2c3..90dc3002bc3d 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)
>>>
>