You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
UPSTREAM: 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. Bug: 254441685 Fixes:5ac443e26a("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> (cherry picked from commit09631cf323) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: I6d241fbac3b03f4083457da8c4f079a59c80b42e
This commit is contained in:
@@ -1469,6 +1469,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);
|
||||
|
||||
Reference in New Issue
Block a user