Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1315744 > unrolled thread

[PATCH 4/4] f2fs: use writepages->lock for WB_SYNC_ALL

Started byJaegeuk Kim <jaegeuk@kernel.org>
First post2016-01-23 21:20 +0100
Last post2016-01-23 21:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/4] f2fs: use writepages->lock for WB_SYNC_ALL Jaegeuk Kim <jaegeuk@kernel.org> - 2016-01-23 21:20 +0100

#1315744 — [PATCH 4/4] f2fs: use writepages->lock for WB_SYNC_ALL

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2016-01-23 21:20 +0100
Subject[PATCH 4/4] f2fs: use writepages->lock for WB_SYNC_ALL
Message-ID<qUcP7-81a-15@gated-at.bofh.it>
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 <jaegeuk@kernel.org>
---
 fs/f2fs/data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 7d9f1d9..8d0d9ec 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1403,7 +1403,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;
 	}
-- 
2.6.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web