]> www.infradead.org Git - users/jedix/linux-maple.git/commit
f2fs: multidevice: add stats in debugfs
authorChao Yu <chao@kernel.org>
Wed, 16 Oct 2024 08:24:20 +0000 (16:24 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 1 Nov 2024 01:19:00 +0000 (01:19 +0000)
commit2d56b4e39192fb9693284ce8aa3416b517d785b7
treeb475ef3703bfecb1f0a2568b2aca586180d90041
parent6babe00ccd34fc65b78ef8b99754e32b4385f23d
f2fs: multidevice: add stats in debugfs

This patch adds per-device stats in debugfs, the examples
are as below:

mkfs.f2fs -f -c /dev/vdc /dev/vdb
mount /dev/vdb /mnt/f2fs/
cat /sys/kernel/debug/f2fs/status

Multidevice stats:
  [seg:      inuse    dirty     full     free  prefree]
  #0             5        0        0     4007        0
  #1             1        0        0     8191        0

mkfs.f2fs -f -s 2 -c /dev/vdc /dev/vdb
mount /dev/vdb /mnt/f2fs
cat /sys/kernel/debug/f2fs/status

Multidevice stats:
  [seg:      inuse    dirty     full     free  prefree] [sec:      inuse    dirty     full     free  prefree]
  #0             5        0        0     4005        0                 5        0        0     2000        0
  #1             1        0        0     8191        0                 1        0        0     4095        0

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/debug.c
fs/f2fs/f2fs.h