Re: [f2fs-dev] [PATCH] f2fs: separate NOCoW and pinfile semantics

2022-05-12 Thread Chao Yu
On 2022/5/13 5:57, Jaegeuk Kim wrote: On 05/12, Chao Yu wrote: Pinning a file is heavy, because skipping pinned files make GC running with heavy load or no effect. So that this patch proposes to separate nocow and pinfile semantics: - NOCoW flag can only be set on regular file. - NOCoW file wil

Re: [f2fs-dev] [PATCH] f2fs: separate NOCoW and pinfile semantics

2022-05-12 Thread Jaegeuk Kim
On 05/12, Chao Yu wrote: > Pinning a file is heavy, because skipping pinned files make GC > running with heavy load or no effect. > > So that this patch proposes to separate nocow and pinfile semantics: > - NOCoW flag can only be set on regular file. > - NOCoW file will only trigger IPU at common

Re: [f2fs-dev] [PATCH 4/5 v2] f2fs: do not stop GC when requiring a free section

2022-05-12 Thread Jaegeuk Kim
On 05/12, Jaegeuk Kim wrote: > The f2fs_gc uses a bitmap to indicate pinned sections, but when disabling > chckpoint, we call f2fs_gc() with NULL_SEGNO which selects the same dirty > segment as a victim all the time, resulting in checkpoint=disable failure, > for example. Let's pick another one, if

Re: [f2fs-dev] [PATCH 4/5] f2fs: do not stop GC when requiring a free section

2022-05-12 Thread Jaegeuk Kim
On 05/12, Chao Yu wrote: > On 2022/5/12 0:47, Jaegeuk Kim wrote: > > > > > > @@ -147,6 +147,7 @@ static int gc_thread_func(void *data) > > > > > > gc_control.init_gc_type = sync_mode ? FG_GC : > > > > > > BG_GC; > > > > > > gc_control.no_bg_gc = foreground;

Re: [f2fs-dev] [PATCH 2/5 v2] f2fs: introduce f2fs_gc_control to consolidate f2fs_gc parameters

2022-05-12 Thread Jaegeuk Kim
No functional change. - remove checkpoint=disable check for f2fs_write_checkpoint - get sec_freed all the time Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Change log from v1: - clean up more fs/f2fs/f2fs.h | 11 +- fs/f2fs/file.c | 30 ---

Re: [f2fs-dev] [PATCH 4/5 v2] f2fs: do not stop GC when requiring a free section

2022-05-12 Thread Jaegeuk Kim
The f2fs_gc uses a bitmap to indicate pinned sections, but when disabling chckpoint, we call f2fs_gc() with NULL_SEGNO which selects the same dirty segment as a victim all the time, resulting in checkpoint=disable failure, for example. Let's pick another one, if we fail to collect it. Signed-off-b

Re: [f2fs-dev] [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write()

2022-05-12 Thread Jaegeuk Kim
On 05/12, Dan Carpenter wrote: > On Wed, May 11, 2022 at 10:37:57AM -0700, Jaegeuk Kim wrote: > > Hi Dan, > > > > Thank you for the fix. If you don't mind, can I integrate this fix into > > the original patch which is in -next? > > > > Yeah, that's not a problem. Feel free. Thank you~ > > re

Re: [f2fs-dev] [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write()

2022-05-12 Thread Dan Carpenter
On Wed, May 11, 2022 at 10:37:57AM -0700, Jaegeuk Kim wrote: > Hi Dan, > > Thank you for the fix. If you don't mind, can I integrate this fix into > the original patch which is in -next? > Yeah, that's not a problem. Feel free. regards, dan carpenter > Thanks, > > On 05/11, Dan Carpenter wro

[f2fs-dev] [PATCH] f2fs: separate NOCoW and pinfile semantics

2022-05-12 Thread Chao Yu
Pinning a file is heavy, because skipping pinned files make GC running with heavy load or no effect. So that this patch proposes to separate nocow and pinfile semantics: - NOCoW flag can only be set on regular file. - NOCoW file will only trigger IPU at common writeback/flush. - NOCow file will do