summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-11-19 20:03:34 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-20 07:49:33 +0100
commit857dc4e0598e2a95b1cbb8d17c8538b34cc9a2f3 (patch)
treea4cd03effa2c3bf57a58d59e268ad3dbfd2c3c47 /fs/f2fs
parentf2fs: submit bio for node blocks in the reclaim path (diff)
downloadlinux-857dc4e0598e2a95b1cbb8d17c8538b34cc9a2f3.tar.xz
linux-857dc4e0598e2a95b1cbb8d17c8538b34cc9a2f3.zip
f2fs: write SSA pages under memory pressure
Under memory pressure, we don't need to skip SSA page writes. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/checkpoint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 838e8ed3d13a..20a917b05b99 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -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: