Re: [f2fs-dev] [PATCH v4] f2fs: compress: support chksum

From: Chao Yu
Date: Wed Dec 09 2020 - 03:43:03 EST


On 2020/12/9 16:31, Chao Yu wrote:
On 2020/12/9 16:23, Jaegeuk Kim wrote:
On 12/09, Chao Yu wrote:
On 2020/12/9 12:28, Chao Yu wrote:
On 2020/12/9 11:54, Jaegeuk Kim wrote:
Ah, could you please write another patch to adjust the new changes?

No problem, will drop "f2fs: compress:support chksum" based on your dev branch, and
apply all compress related patches on top of dev branch.

Jaegeuk, could you please
- drop "f2fs: compress:support chksum",

What I mean is keeping the old version in dev branch as is, since it gives
another conflicts when dropping it. That can add another bug at this point.
Can I get a separate patch to fix any issues in that original patch?

Oops...

The diff is as below:

From 1ad86c640d3a295292960f6b90802cc5a9be7a0d Mon Sep 17 00:00:00 2001
From: Chao Yu <yuchao0@xxxxxxxxxx>
Date: Wed, 9 Dec 2020 16:36:58 +0800
Subject: [PATCH] fix_chksum

Signed-off-by: Chao Yu <yuchao0@xxxxxxxxxx>
---
fs/f2fs/compress.c | 3 +--
fs/f2fs/compress.h | 0
2 files changed, 1 insertion(+), 2 deletions(-)
create mode 100644 fs/f2fs/compress.h

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index f05d409fd0ed..4bcbacfe3325 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -796,7 +796,7 @@ void f2fs_decompress_pages(struct bio *bio, struct page *page, bool verity)

ret = cops->decompress_pages(dic);

- if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) {
+ if (!ret && (fi->i_compress_flag & 1 << COMPRESS_CHKSUM)) {
u32 provided = le32_to_cpu(dic->cbuf->chksum);
u32 calculated = f2fs_crc32(sbi, dic->cbuf->cdata, dic->clen);

@@ -809,7 +809,6 @@ void f2fs_decompress_pages(struct bio *bio, struct page *page, bool verity)
provided, calculated);
}
set_sbi_flag(sbi, SBI_NEED_FSCK);
- WARN_ON_ONCE(1);
}
}

diff --git a/fs/f2fs/compress.h b/fs/f2fs/compress.h
new file mode 100644
index 000000000000..e69de29bb2d1
--
2.29.2


Thanks,


- manually fix conflict when applying "f2fs: add compress_mode mount option"
- and then apply last my resent patches.

Thanks,
.



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
.