From: Baokun Li <libaokun@linux.alibaba.com>
To: Baolin Liu <liubaolin12138@163.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, ojaswin@linux.ibm.com,
ritesh.list@gmail.com, yi.zhang@huawei.com,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
wangguanyu@vivo.com, Baolin Liu <liubaolin@kylinos.cn>,
Andreas Dilger <adilger@dilger.ca>
Subject: Re: [PATCH v3 v3 1/2] ext4: add blocks_allocated to mb_stats output
Date: Fri, 24 Apr 2026 10:35:05 +0800 [thread overview]
Message-ID: <afdf84d7-7fbd-4d47-ae67-996f5339b2ea@linux.alibaba.com> (raw)
In-Reply-To: <20260422015026.7170-2-liubaolin12138@163.com>
On 2026/4/22 09:50, Baolin Liu wrote:
> From: Baolin Liu <liubaolin@kylinos.cn>
>
> Add blocks_allocated to /proc/fs/ext4/<dev>/mb_stats so that the
> reported statistics match the mballoc summary printed at unmount time.
>
> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
> Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Looks good, feel free to add:
Reviewed-by: Baokun Li <libaokun@linux.alibaba.com>
> ---
> fs/ext4/mballoc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 20e9fdaf4301..1e13ef62cb9d 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -3211,6 +3211,8 @@ int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset)
> "\tTo enable, please write \"1\" to sysfs file mb_stats.\n");
> return 0;
> }
> + seq_printf(seq, "\tblocks_allocated: %u\n",
> + atomic_read(&sbi->s_bal_allocated));
> seq_printf(seq, "\treqs: %u\n", atomic_read(&sbi->s_bal_reqs));
> seq_printf(seq, "\tsuccess: %u\n", atomic_read(&sbi->s_bal_success));
>
next prev parent reply other threads:[~2026-04-24 2:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 1:50 [PATCH v3 v3 0/2] add blocks_allocated to mb_stats and clear mb_stats Baolin Liu
2026-04-22 1:50 ` [PATCH v3 v3 1/2] ext4: add blocks_allocated to mb_stats output Baolin Liu
2026-04-24 2:35 ` Baokun Li [this message]
2026-04-22 1:50 ` [PATCH v3 v3 2/2] ext4: allow clearing mballoc stats through mb_stats Baolin Liu
2026-04-23 16:19 ` Theodore Tso
2026-04-24 3:12 ` Baokun Li
2026-04-24 8:09 ` liubaolin
2026-04-24 9:34 ` Baokun Li
2026-04-24 12:07 ` Theodore Tso
2026-04-22 9:55 ` [PATCH v3 v3 0/2] add blocks_allocated to mb_stats and clear mb_stats liubaolin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afdf84d7-7fbd-4d47-ae67-996f5339b2ea@linux.alibaba.com \
--to=libaokun@linux.alibaba.com \
--cc=adilger.kernel@dilger.ca \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liubaolin12138@163.com \
--cc=liubaolin@kylinos.cn \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=wangguanyu@vivo.com \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox