diff options
author | Daeho Jeong | 2021-10-06 10:49:10 -0700 |
---|---|---|
committer | Jaegeuk Kim | 2021-10-26 14:04:30 -0700 |
commit | 09631cf3234d32156e7cae32275f5a4144c683c5 (patch) | |
tree | 2287a86b928081fd05177f6e979e7b3f623d580f /fs/f2fs | |
parent | cd6d697a6e2013a0a85f8b261b16c8cfd50c1f5f (diff) |
f2fs: include non-compressed blocks in compr_written_block
Need to include non-compressed blocks in compr_written_block to
estimate average compression ratio more accurately.
Fixes: 5ac443e26a09 ("f2fs: add sysfs nodes to get runtime compression stat")
Cc: stable@vger.kernel.org
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-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 c1bf9ad4c220..9b663eaf4805 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1530,6 +1530,7 @@ int f2fs_write_multi_pages(struct compress_ctx *cc, if (cluster_may_compress(cc)) { err = f2fs_compress_pages(cc); if (err == -EAGAIN) { + add_compr_block_stat(cc->inode, cc->cluster_size); goto write; } else if (err) { f2fs_put_rpages_wbc(cc, wbc, true, 1); |