Re: [PATCH v2 v2 2/2] ext4: allow clearing mballoc stats through mb_stats
From: Andreas Dilger
Date: Mon Apr 20 2026 - 14:29:02 EST
On Apr 20, 2026, at 03:12, Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx> wrote:
>
> On Sun, Apr 19, 2026 at 02:34:36PM +0800, Baolin Liu wrote:
>> From: Baolin Liu <liubaolin@xxxxxxxxxx>
>>
>> Make /proc/fs/ext4/<dev>/mb_stats writable and clear the runtime
>> mballoc statistics when 0 is written.
>>
>> Signed-off-by: Baolin Liu <liubaolin@xxxxxxxxxx>
>> ---
> Hi Baolin, thanks for the changes.
>
> Seems like userspace doesn't have any way to know that writing 0 will
> clear the that. Well, I guess if you are looking at this file you are
> anyways debugging kernel code so that should be fine
That could be documented in Documentation/filesystems/ext4/allocators.rst,
or better would be to add a new file that covers mballoc in more detail.
Cheers, Andreas