diff options
| author | Chao Yu <chao2.yu@samsung.com> | 2016-02-22 18:35:46 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:33:07 +0200 |
| commit | 0e45c72ee4f76dc6e389b17329f58dcf4dd3e0b4 (patch) | |
| tree | 682d555b6a10784d10d631c0ad210d8194fa8827 | |
| parent | 48ff451b1eef7ad8fdddfcc1c1f1f6568694a23e (diff) | |
f2fs: try to flush inode after merging inline data
When flushing node pages, if current node page is an inline inode page, we
will try to merge inline data from data page into inline inode page, then
skip flushing current node page, it will decrease the number of nodes to
be flushed in batch in this round, which may lead to worse performance.
This patch gives a chance to flush just merged inline inode pages for
performance.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/node.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index a86231ef1..f1f84aabc 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1275,6 +1275,7 @@ next_step: * If an fsync mode, * we should not skip writing node pages. */ +lock_node: if (ino && ino_of_node(page) == ino) lock_page(page); else if (!trylock_page(page)) @@ -1298,7 +1299,7 @@ continue_unlock: clear_inline_node(page); unlock_page(page); flush_inline_data(sbi, ino_of_node(page)); - continue; + goto lock_node; } f2fs_wait_on_page_writeback(page, NODE, true); |
