summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/compress.c
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2021-03-15 09:12:33 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2021-03-26 02:20:50 +0100
commit5ac443e26a096429065349c640538101012ce40d (patch)
tree5256928e9ecf186a14e2981ad003af785767ee21 /fs/f2fs/compress.c
parentf2fs: fix to use per-inode maxbytes in f2fs_fiemap (diff)
downloadlinux-5ac443e26a096429065349c640538101012ce40d.tar.xz
linux-5ac443e26a096429065349c640538101012ce40d.zip
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.c1
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)