From: Baolin Liu <liubaolin@kylinos.cn>
This series improves mballoc statistics reporting and control by adding
blocks_allocated to /proc/fs/ext4/<dev>/mb_stats, using
READ_ONCE()/WRITE_ONCE() for concurrent accesses to s_mb_stats, and
allowing mballoc stats to be controlled through
/proc/fs/ext4/<dev>/mb_stats.
Changes in v6:
- Serialize proc and sysfs updates to s_mb_stats with a mutex so that
clearing mb_stats through the proc control path cannot race with
concurrent administrative writes.
Baolin Liu (3):
ext4: add blocks_allocated to mb_stats output
ext4: use READ_ONCE/WRITE_ONCE for s_mb_stats
ext4: allow controlling mballoc stats through proc mb_stats
Documentation/ABI/testing/sysfs-fs-ext4 | 3 +-
Documentation/admin-guide/ext4.rst | 9 ++-
Documentation/filesystems/proc.rst | 13 +---
fs/ext4/ext4.h | 2 +
fs/ext4/mballoc.c | 58 ++++++++++++++----
fs/ext4/sysfs.c | 80 ++++++++++++++++++++++++-
6 files changed, 135 insertions(+), 30 deletions(-)
--
2.51.0