[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211006174910.2964885-1-daeho43@gmail.com>
Date: Wed, 6 Oct 2021 10:49:10 -0700
From: Daeho Jeong <daeho43@...il.com>
To: linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com
Cc: Daeho Jeong <daehojeong@...gle.com>
Subject: [PATCH] f2fs: include non-compressed blocks in compr_written_block
From: Daeho Jeong <daehojeong@...gle.com>
Need to include non-compressed blocks in compr_written_block to
estimate average compression ratio more accurately.
Signed-off-by: Daeho Jeong <daehojeong@...gle.com>
---
fs/f2fs/compress.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.33.0.882.g93a45727a2-goog
Powered by blists - more mailing lists