f2fs: use wait_for_stable_page to avoid contention

In write_begin, if storage supports stable_page, we don't need to wait for
writeback to update its contents.
This patch introduces to use wait_for_stable_page instead of
wait_on_page_writeback.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Jaegeuk Kim 2016-01-20 23:43:51 +08:00
parent 718e53fa63
commit fec1d6576c
13 changed files with 47 additions and 42 deletions

View file

@ -39,7 +39,7 @@ repeat:
cond_resched();
goto repeat;
}
f2fs_wait_on_page_writeback(page, META);
f2fs_wait_on_page_writeback(page, META, true);
SetPageUptodate(page);
return page;
}
@ -232,7 +232,7 @@ static int f2fs_write_meta_page(struct page *page,
if (unlikely(f2fs_cp_error(sbi)))
goto redirty_out;
f2fs_wait_on_page_writeback(page, META);
f2fs_wait_on_page_writeback(page, META, true);
write_meta_page(sbi, page);
dec_page_count(sbi, F2FS_DIRTY_META);
unlock_page(page);