From: Baolin Liu <liubaolin12138@163.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca
Cc: wangguanyu@vivo.com, liubaolin12138@163.com,
yi.zhang@huaweicloud.com, ritesh.list@gmail.com,
ojaswin@linux.ibm.com, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 v2 0/2] add blocks_allocated to mb_stats and clear mb_stats
Date: Sun, 19 Apr 2026 14:34:34 +0800 [thread overview]
Message-ID: <20260419063436.17999-1-liubaolin12138@163.com> (raw)
This series improves ext4 mballoc statistics in two small ways.
The first patch adds blocks_allocated to /proc/fs/ext4/<dev>/mb_stats,
so that the proc output covers the same mballoc summary counters
printed at unmount time.
The second patch makes /proc/fs/ext4/<dev>/mb_stats writable
and allows writing 0 to clear the current runtime mballoc statistics.
Changes since v1:
- Split blocks_allocated reporting and statistics clearing into two patches
- Drop the separate mb_stats_clear sysfs node
- Make /proc/fs/ext4/<dev>/mb_stats writable instead
Baolin Liu (2):
ext4: add blocks_allocated to mb_stats output
ext4: allow clearing mballoc stats through mb_stats
fs/ext4/ext4.h | 1 +
fs/ext4/mballoc.c | 31 +++++++++++++++++++++++++++++++
fs/ext4/sysfs.c | 40 ++++++++++++++++++++++++++++++++++++++--
3 files changed, 70 insertions(+), 2 deletions(-)
--
2.51.0
next reply other threads:[~2026-04-19 6:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 6:34 Baolin Liu [this message]
2026-04-19 6:34 ` [PATCH v2 v2 1/2] ext4: add blocks_allocated to mb_stats output Baolin Liu
2026-04-19 9:19 ` Andreas Dilger
2026-04-20 9:13 ` Ojaswin Mujoo
2026-04-19 6:34 ` [PATCH v2 v2 2/2] ext4: allow clearing mballoc stats through mb_stats Baolin Liu
2026-04-19 9:23 ` Andreas Dilger
2026-04-20 9:12 ` Ojaswin Mujoo
2026-04-20 18:28 ` Andreas Dilger
2026-04-21 3:40 ` Ritesh Harjani
2026-04-21 5:22 ` liubaolin
2026-04-21 6:12 ` Ojaswin Mujoo
2026-04-21 7:07 ` liubaolin
-- strict thread matches above, loose matches on Subject: below --
2026-04-19 6:31 [PATCH v2 v2 0/2] add blocks_allocated to mb_stats and clear mb_stats Baolin Liu
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=20260419063436.17999-1-liubaolin12138@163.com \
--to=liubaolin12138@163.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=wangguanyu@vivo.com \
--cc=yi.zhang@huaweicloud.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