lkml.org 
[lkml]   [2015]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] f2fs: should get a victim from retrials
Date
If we do not call get_victim first, we cannot get a new victim for retrial
path.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/gc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 782b8e7..e932740 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -823,7 +823,8 @@ gc_more:
write_checkpoint(sbi, &cpc);
}

- if (segno == NULL_SEGNO && !__get_victim(sbi, &segno, gc_type))
+ /* should call __get_victim first to get a victim from retrial path */
+ if (!__get_victim(sbi, &segno, gc_type) && segno == NULL_SEGNO)
goto stop;
ret = 0;

--
2.1.1


\
 
 \ /
  Last update: 2015-09-21 21:41    [W:0.052 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site