Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-09 Thread Yunlong Song
Agree. On 2017/11/10 1:59, Jaegeuk Kim wrote: On 11/08, Yunlong Song wrote: So we should use f2fs_bug_on(sbi, !total_freed && !sync && gc_type == FG_GC); f2fs_bug_on(sbi, !total_freed && has_not_enough_free_secs(sbi, 0, 0)); ? On 2017/11/7 14:56, Chao Yu wrote: On 2017/11/7 12:01, Yunlong S

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-09 Thread Jaegeuk Kim
On 11/08, Yunlong Song wrote: > So we should use f2fs_bug_on(sbi, !total_freed && !sync && gc_type == > FG_GC); f2fs_bug_on(sbi, !total_freed && has_not_enough_free_secs(sbi, 0, 0)); ? > > On 2017/11/7 14:56, Chao Yu wrote: > > On 2017/11/7 12:01, Yunlong Song wrote: > > > Sorry, misunderstandin

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-07 Thread Yunlong Song
So we should use f2fs_bug_on(sbi, !total_freed && !sync && gc_type == FG_GC); On 2017/11/7 14:56, Chao Yu wrote: On 2017/11/7 12:01, Yunlong Song wrote: Sorry, misunderstanding, because I think when sync == true, FG_GC does not check has_not_enough_free_secs, so maybe it does not have to do an

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-06 Thread Chao Yu
On 2017/11/7 12:01, Yunlong Song wrote: > Sorry, misunderstanding, because I think when sync == true, FG_GC does not > check has_not_enough_free_secs, so maybe it does not have to do any gc > at all. > For example, if there are 100 segments for f2fs, and 20 segments are full or > valid blocks over

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-06 Thread Yunlong Song
Sorry, misunderstanding, because I think when sync == true, FG_GC does not check has_not_enough_free_secs, so maybe it does not have to do any gc at all. For example, if there are 100 segments for f2fs, and 20 segments are full or valid blocks over fggc_threshold, then it is correct to fail in g

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-06 Thread Jaegeuk Kim
On 11/07, Yunlong Song wrote: > Because I find that some out-of-free problem is caused by the failure > of get victim target. For example, chao has pointed out that he has > found out a bug when adding this bug_on last week. That's NOT what I asked. Why not checking FG_GC all the time like this?

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-06 Thread Yunlong Song
Because I find that some out-of-free problem is caused by the failure of get victim target. For example, chao has pointed out that he has found out a bug when adding this bug_on last week. On 2017/11/7 10:40, Jaegeuk Kim wrote: On 11/06, Jaegeuk Kim wrote: On 11/06, Yunlong Song wrote: Agree.

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-06 Thread Jaegeuk Kim
On 11/06, Jaegeuk Kim wrote: > On 11/06, Yunlong Song wrote: > > Agree. > > > > On 2017/11/3 11:44, Jaegeuk Kim wrote: > > > On 10/13, Yunlong Song wrote: > > > > This can help us to debug on some corner case. > > > > > > > > Signed-off-by: Yunlong Song > > > > Signed-off-by: Chao Yu > > > > --

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-06 Thread Jaegeuk Kim
On 11/06, Yunlong Song wrote: > Agree. > > On 2017/11/3 11:44, Jaegeuk Kim wrote: > > On 10/13, Yunlong Song wrote: > > > This can help us to debug on some corner case. > > > > > > Signed-off-by: Yunlong Song > > > Signed-off-by: Chao Yu > > > --- > > > fs/f2fs/gc.c | 6 +- > > > 1 file

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-05 Thread Yunlong Song
Agree. On 2017/11/3 11:44, Jaegeuk Kim wrote: On 10/13, Yunlong Song wrote: This can help us to debug on some corner case. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu --- fs/f2fs/gc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-03 Thread 宋云龙
OK to me. > > >> On 10/13, Yunlong Song wrote: >> This can help us to debug on some corner case. >> >> Signed-off-by: Yunlong Song >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/gc.c | 6 +- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c >> i

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-02 Thread Yunlong Song
ping... On 2017/10/13 21:31, Yunlong Song wrote: This can help us to debug on some corner case. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu --- fs/f2fs/gc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 197ebf4..2b03202 10

Re: [PATCH v2] f2fs: add bug_on when f2fs_gc even fails to get one victim

2017-11-02 Thread Jaegeuk Kim
On 10/13, Yunlong Song wrote: > This can help us to debug on some corner case. > > Signed-off-by: Yunlong Song > Signed-off-by: Chao Yu > --- > fs/f2fs/gc.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index 197ebf4..2b03202 100644