Re: [f2fs-dev] [PATCH] f2fs-tools: fix the wrong sbi->cur_cp setting

2021-10-25 Thread Wang Xiaojun
在 2021/10/26 9:47, Chao Yu 写道: On 2021/10/26 9:38, Wang Xiaojun wrote: 在 2021/10/26 8:29, Chao Yu 写道: On 2021/10/25 20:09, Wang Xiaojun wrote: If sbi->cur_cp is 2 and the duplicate_checkpoint function returns in advance because sbi->cp_backuped is set to true, we cannot set sbi->cur_cp to 1.

Re: [f2fs-dev] [PATCH] f2fs-tools: fix the wrong sbi->cur_cp setting

2021-10-25 Thread Chao Yu
On 2021/10/26 9:38, Wang Xiaojun wrote: 在 2021/10/26 8:29, Chao Yu 写道: On 2021/10/25 20:09, Wang Xiaojun wrote: If sbi->cur_cp is 2 and the duplicate_checkpoint function returns in advance because sbi->cp_backuped is set to true, we cannot set sbi->cur_cp to 1. Hmmm, in previous implementati

Re: [f2fs-dev] [PATCH] f2fs-tools: fix the wrong sbi->cur_cp setting

2021-10-25 Thread Wang Xiaojun
在 2021/10/26 8:29, Chao Yu 写道: On 2021/10/25 20:09, Wang Xiaojun wrote: If sbi->cur_cp is 2 and the duplicate_checkpoint function returns in advance because sbi->cp_backuped is set to true, we cannot set sbi->cur_cp to 1. Hmmm, in previous implementation, what problem we will encounter, and w

Re: [f2fs-dev] [PATCH] f2fs: remove circular locking between sb_internal and fs_reclaim

2021-10-25 Thread Chao Yu
On 2021/10/26 0:22, Daeho Jeong wrote: On Fri, Oct 22, 2021 at 8:32 AM Chao Yu wrote: On 2021/10/22 0:44, Daeho Jeong wrote: There is a deadlock between sb_internal lock (sb_start_intwrite()) and dquot related lock. It's because we call f2fs_truncate(), which eventually calls dquot_initialize

Re: [f2fs-dev] [PATCH] f2fs-tools: fix the wrong sbi->cur_cp setting

2021-10-25 Thread Chao Yu
On 2021/10/25 20:09, Wang Xiaojun wrote: If sbi->cur_cp is 2 and the duplicate_checkpoint function returns in advance because sbi->cp_backuped is set to true, we cannot set sbi->cur_cp to 1. Hmmm, in previous implementation, what problem we will encounter, and what's the root cause? Thanks,

Re: [f2fs-dev] [PATCH v3] f2fs: compress: fix overwrite may reduce compress ratio unproperly

2021-10-25 Thread Chao Yu
On 2021/10/26 5:56, Jaegeuk Kim wrote: Could you please take a look? https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=00426e4d450aad0ed66b04a16959e1895c1d29e7 Looks good to me. Thanks, ___ Linux-f2fs-devel mailing

Re: [f2fs-dev] [PATCH] f2fs: fix f2fs.rst build warning

2021-10-25 Thread Chao Yu
On 2021/10/23 10:58, Fengnan Chang wrote: fix f2fs.rst build warning. Fixes: 151b1982be5d (f2fs: compress: add nocompress extensions support) Signed-off-by: Fengnan Chang Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-

Re: [f2fs-dev] [PATCH] f2fs: remove circular locking between sb_internal and fs_reclaim

2021-10-25 Thread Daeho Jeong
On Fri, Oct 22, 2021 at 8:32 AM Chao Yu wrote: > > On 2021/10/22 0:44, Daeho Jeong wrote: > > There is a deadlock between sb_internal lock (sb_start_intwrite()) and > > dquot related lock. > > It's because we call f2fs_truncate(), which eventually calls > > dquot_initialize(), while holding sb_int

[f2fs-dev] [PATCH] f2fs: compress: disallow disabling compress on non-empty compressed file

2021-10-25 Thread Hyeong-Jun Kim
Compresse file and normal file has differ in i_addr addressing, specifically addrs per inode/block. So, we will face data loss, if we disable the compression flag on non-empty files. Therefore we should disallow not only enabling but disabling the compression flag on non-empty files. Signed-off-by

[f2fs-dev] [PATCH] f2fs-tools: fix the wrong sbi->cur_cp setting

2021-10-25 Thread Wang Xiaojun
If sbi->cur_cp is 2 and the duplicate_checkpoint function returns in advance because sbi->cp_backuped is set to true, we cannot set sbi->cur_cp to 1. Signed-off-by: Wang Xiaojun --- fsck/fsck.c | 3 --- fsck/mount.c | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/fsck/

Re: [f2fs-dev] [PATCH v1] f2fs: compress: reduce one page array alloc and free when write compressed page

2021-10-25 Thread 常凤楠
It seems this has been forgotten.. > -Original Message- > From: Fengnan Chang > Sent: Friday, July 23, 2021 4:38 PM > To: c...@kernel.org; jaeg...@kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Fengnan Chang > Subject: [PATCH v1] f2fs: compress: reduce one page array alloc an