Re: [PATCH 4/4] btrfs: add test for zone auto reclaim

Johannes Thumshirn
2021-04-26T06:08:50Z

On 25/04/2021 10:33, Eryu Guan wrote:
[...]
>> +_scratch_mkfs >/dev/null 2>&1
>> +_scratch_mount -o commit=5
>
> Any reason to use "-o commit=5" mount option? A comment would be good.
>
This is to increase the transaction frequency.

[...]
>
> Why are above two sleeps needed? They make test time longer. Remove them
> if they're not required, otherwise adding some comments would be good.

We need the sleeps to ensure, that the data really has reached the disks,
i.e. a transaction has happened. Otherwise we won't see a) that the zone
states have changed on disk and b) zoned btrfs won't transfer deleted
bytes to zone unusable bytes, which trigger the reclaim. I'll add comments
for both.

[...]
>> +236 auto quick balance
>
> I don't see a balance operation, does it fit into balance group?

Autoreclaim internally triggers a balance of one block group, so I thought
it would be a good fit.

Hope I could clarify some things.

> Thanks,
> Eryu
>
> P.S. I've applied the first patch in this patchset.

Thanks :)