diff options
author | Daeho Jeong <daehojeong@google.com> | 2021-03-15 17:12:33 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-03-25 18:20:50 -0700 |
commit | 5ac443e26a096429065349c640538101012ce40d (patch) | |
tree | 5256928e9ecf186a14e2981ad003af785767ee21 /fs/f2fs/compress.c | |
parent | 0bb2045ce5ce67b0428301c117ec960b3f705a44 (diff) |
f2fs: add sysfs nodes to get runtime compression stat
I've added new sysfs nodes to show runtime compression stat since mount.
compr_written_block - show the block count written after compression
compr_saved_block - show the saved block count with compression
compr_new_inode - show the count of inode newly enabled for compression
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/compress.c')
-rw-r--r-- | fs/f2fs/compress.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 77fa342de38f..3c9d797dbdd6 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1353,6 +1353,7 @@ unlock_continue: if (fio.compr_blocks) f2fs_i_compr_blocks_update(inode, fio.compr_blocks - 1, false); f2fs_i_compr_blocks_update(inode, cc->nr_cpages, true); + add_compr_block_stat(inode, cc->nr_cpages); set_inode_flag(cc->inode, FI_APPEND_WRITE); if (cc->cluster_idx == 0) |