From: Chao Yu Date: Mon, 22 Feb 2016 10:35:46 +0000 (+0800) Subject: f2fs: try to flush inode after merging inline data X-Git-Tag: v4.6-rc1~66^2~18 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9a4cbc9e5318608740e3e3e44d4d565e19ad5e74;p=linux.git 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 Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 966176b4027a..82cde7a2117c 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1275,6 +1275,7 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, * 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 @@ int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino, 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);