Skip to content

Commit 09631cf

Browse files
Daeho JeongJaegeuk Kim
authored andcommitted
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: 5ac443e ("f2fs: add sysfs nodes to get runtime compression stat") Cc: [email protected] Signed-off-by: Daeho Jeong <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent cd6d697 commit 09631cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/f2fs/compress.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,7 @@ int f2fs_write_multi_pages(struct compress_ctx *cc,
15301530
if (cluster_may_compress(cc)) {
15311531
err = f2fs_compress_pages(cc);
15321532
if (err == -EAGAIN) {
1533+
add_compr_block_stat(cc->inode, cc->cluster_size);
15331534
goto write;
15341535
} else if (err) {
15351536
f2fs_put_rpages_wbc(cc, wbc, true, 1);

0 commit comments

Comments
 (0)