Skip to content

Commit

Permalink
f2fs: use writepages->lock for WB_SYNC_ALL
Browse files Browse the repository at this point in the history
If there are many writepages calls by multiple threads in background, we don't
need to serialize to merge all the bios, since it's background.
In such the case, it'd better to run writepages concurrently.

Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Jaegeuk Kim authored and TheScarastic committed May 21, 2017
1 parent 770ab47 commit 1842bc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ static int f2fs_write_data_pages(struct address_space *mapping,

diff = nr_pages_to_write(sbi, DATA, wbc);

if (!S_ISDIR(inode->i_mode)) {
if (!S_ISDIR(inode->i_mode) && wbc->sync_mode == WB_SYNC_ALL) {
mutex_lock(&sbi->writepages);
locked = true;
}
Expand Down

0 comments on commit 1842bc3

Please sign in to comment.