]> asedeno.scripts.mit.edu Git - linux.git/commit
f2fs: Add f2fs stats to sysfs
authorHridya Valsaraju <hridya@google.com>
Wed, 22 Jan 2020 18:51:16 +0000 (10:51 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 23 Jan 2020 17:24:25 +0000 (09:24 -0800)
commitfc7100ea2a52fcf200be75421bfd32652827d287
treed31ef4a2d52cc4bfab836544a3bcd4642f2a01a0
parentf5fa7c8bb6307624b2177dfedc67da8dbc3a7a52
f2fs: Add f2fs stats to sysfs

Currently f2fs stats are only available from /d/f2fs/status. This patch
adds some of the f2fs stats to sysfs so that they are accessible even
when debugfs is not mounted.

The following sysfs nodes are added:
-/sys/fs/f2fs/<disk>/free_segments
-/sys/fs/f2fs/<disk>/cp_foreground_calls
-/sys/fs/f2fs/<disk>/cp_background_calls
-/sys/fs/f2fs/<disk>/gc_foreground_calls
-/sys/fs/f2fs/<disk>/gc_background_calls
-/sys/fs/f2fs/<disk>/moved_blocks_foreground
-/sys/fs/f2fs/<disk>/moved_blocks_background
-/sys/fs/f2fs/<disk>/avg_vblocks

Signed-off-by: Hridya Valsaraju <hridya@google.com>
[Jaegeuk Kim: allow STAT_FS without DEBUG_FS]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/Kconfig
fs/f2fs/debug.c
fs/f2fs/f2fs.h
fs/f2fs/gc.c
fs/f2fs/sysfs.c