[f2fs-dev] [PATCH V2 2/2] f2fs: Add a new CP flag to help fsck fix resize SPO issues

2020-03-03 Thread Sahitya Tummala
Add and set a new CP flag CP_RESIZEFS_FLAG during online resize FS to help fsck fix the metadata mismatch that may happen due to SPO during resize, where SB got updated but CP data couldn't be written yet. fsck errors - Info: CKPT version = 6ed7bccb Wrong user_block_count(2233856) [f2fs_do

Re: [f2fs-dev] [PATCH 1/2] f2fs: Fix mount failure due to SPO after a successful online resize FS

2020-03-03 Thread Sahitya Tummala
Hi Chao, On Tue, Mar 03, 2020 at 08:06:21PM +0800, Chao Yu wrote: > Hi Sahitya, > > On 2020/3/2 12:39, Sahitya Tummala wrote: > > Hi Chao, > > > > On Fri, Feb 28, 2020 at 04:35:37PM +0800, Chao Yu wrote: > >> Hi Sahitya, > >> > >> Good catch. > >> > >> On 2020/2/27 18:39, Sahitya Tummala wrote:

[f2fs-dev] [PATCH] f2fs: fix to update f2fs_super_block fields under sb_lock

2020-03-03 Thread Chao Yu
Fields in struct f2fs_super_block should be updated under coverage of sb_lock, fix to adjust update_sb_metadata() for that rule. Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS") Signed-off-by: Chao Yu --- fs/f2fs/gc.c | 17 + 1 file changed, 13 insertions(+), 4

Re: [f2fs-dev] [PATCH 1/2] f2fs: Fix mount failure due to SPO after a successful online resize FS

2020-03-03 Thread Chao Yu
Hi Sahitya, On 2020/3/2 12:39, Sahitya Tummala wrote: > Hi Chao, > > On Fri, Feb 28, 2020 at 04:35:37PM +0800, Chao Yu wrote: >> Hi Sahitya, >> >> Good catch. >> >> On 2020/2/27 18:39, Sahitya Tummala wrote: >>> Even though online resize is successfully done, a SPO immediately >>> after resize, s

Re: [f2fs-dev] [PATCH] fsck.f2fs: allow fsck to fix issues with online resize due to SPO

2020-03-03 Thread Chao Yu
On 2020/2/27 18:40, Sahitya Tummala wrote: > Add support for new CP flag CP_RESIZEFS_FLAG set during online > resize FS. If SPO happens after SB is updated but CP isn't, then > allow fsck to fix it. > > fsck errors without this fix - > Info: CKPT version = 6ed7bccb > Wrong user_blo

Re: [f2fs-dev] F2fs panic | update_sit_entry() | no free segment | se invalid

2020-03-03 Thread Chao Yu
On 2020/3/3 16:47, 王矛 wrote: > > Hi Chao, > > Can u kindly help to check Sahitya's comments? > > Thanks, > Mao > > > At 2020-02-17 13:28:29, "Sahitya Tummala" wrote: >>Hi Chao, >> >>On Mon, Feb 17, 2020 at 11:50:56AM +0800, Chao Yu wrote: >>> Hi 王矛, >>> >>> On 2020/2/16 19:39, 王矛 wrote: >>>

[f2fs-dev] [PATCH v2] f2fs: compress: support zstd compress algorithm

2020-03-03 Thread Chao Yu
Add zstd compress algorithm support, use "compress_algorithm=zstd" mountoption to enable it. Signed-off-by: Chao Yu --- v2: - avoid accessing invalid address - introduce .{init,destroy}_{,de}compress_ctx callback functions. Documentation/filesystems/f2fs.txt | 4 +- fs/f2fs/Kconfig

[f2fs-dev] [PATCH 2/2] f2fs: compress: add .{init, destroy}_decompress_ctx callback

2020-03-03 Thread Chao Yu
Add below two callback interfaces in struct f2fs_compress_ops: int (*init_decompress_ctx)(struct decompress_io_ctx *dic); void (*destroy_decompress_ctx)(struct decompress_io_ctx *dic); Which will be used by zstd compress algorithm later. In addition, this patch adds callback func

[f2fs-dev] [PATCH 1/2] f2fs: compress: fix to call missing destroy_compress_ctx()

2020-03-03 Thread Chao Yu
Otherwise, it will cause memory leak. Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index bd3ea01db448..b373102ed4af 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -398,6 +398,8 @@ static i