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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user