]> git.karo-electronics.de Git - linux-beck.git/commitdiff
f2fs: write SSA pages under memory pressure
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 19 Nov 2014 19:03:34 +0000 (11:03 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 20 Nov 2014 06:49:33 +0000 (22:49 -0800)
Under memory pressure, we don't need to skip SSA page writes.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c

index 838e8ed3d13ae8b9c2a0d4052a447b0cf386985f..20a917b05b99d01a56d03716ce37388de517ec02 100644 (file)
@@ -178,7 +178,7 @@ static int f2fs_write_meta_page(struct page *page,
 
        if (unlikely(sbi->por_doing))
                goto redirty_out;
-       if (wbc->for_reclaim)
+       if (wbc->for_reclaim && page->index < GET_SUM_BLOCK(sbi, 0))
                goto redirty_out;
        if (unlikely(f2fs_cp_error(sbi)))
                goto redirty_out;
@@ -187,6 +187,9 @@ static int f2fs_write_meta_page(struct page *page,
        write_meta_page(sbi, page);
        dec_page_count(sbi, F2FS_DIRTY_META);
        unlock_page(page);
+
+       if (wbc->for_reclaim)
+               f2fs_submit_merged_bio(sbi, META, WRITE);
        return 0;
 
 redirty_out: