Under scenerio with large number of dirty nodes, and these nodes are flushed in SSR mode during cp. enough free segemts now, no need to do fggc.
Signed-off-by: Hou Pengyang <houpengy...@huawei.com> --- fs/f2fs/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 6c996e3..41bdfb7 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -959,7 +959,7 @@ int f2fs_gc(struct f2fs_sb_info *sbi, bool sync, bool background) * garbage collections. */ ret = write_checkpoint(sbi, &cpc); - if (ret) + if (ret || !has_not_enough_free_secs(sbi, sec_freed, 0)) goto stop; } else if (gc_type == BG_GC && !background) { /* f2fs_balance_fs doesn't need to do BG_GC in critical path. */ -- 2.10.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel