diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-04-29 17:28:32 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-07 10:21:58 +0900 |
commit | 54b591dfda1f5ab0bc2a9ce1bee5364110168777 (patch) | |
tree | 7f7f2ad061083fad401fcbc96728817e3cbe790e /fs/f2fs/node.c | |
parent | 8aa6f1c5bd7043734fff1961a4795da9cc5d0f50 (diff) | |
download | linux-54b591dfda1f5ab0bc2a9ce1bee5364110168777.tar.gz linux-54b591dfda1f5ab0bc2a9ce1bee5364110168777.tar.bz2 linux-54b591dfda1f5ab0bc2a9ce1bee5364110168777.zip |
f2fs: split grab_cache_page and wait_on_page_writeback for node pages
This patch splits grab_cache_page_write_begin into grab_cache_page and
wait_on_page_writeback for node pages.
This patch intends to enhance the latency to get node pages by alleviating
unnecessary wait_on_page_writeback.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 2803ef6cf533..059aaf5dda2b 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -853,8 +853,7 @@ struct page *new_node_page(struct dnode_of_data *dn, if (unlikely(is_inode_flag_set(F2FS_I(dn->inode), FI_NO_ALLOC))) return ERR_PTR(-EPERM); - page = grab_cache_page_write_begin(NODE_MAPPING(sbi), - dn->nid, AOP_FLAG_NOFS); + page = grab_cache_page(NODE_MAPPING(sbi), dn->nid); if (!page) return ERR_PTR(-ENOMEM); @@ -871,6 +870,7 @@ struct page *new_node_page(struct dnode_of_data *dn, new_ni.ino = dn->inode->i_ino; set_node_addr(sbi, &new_ni, NEW_ADDR, false); + f2fs_wait_on_page_writeback(page, NODE); fill_node_footer(page, dn->nid, dn->inode->i_ino, ofs, true); set_cold_node(dn->inode, page); SetPageUptodate(page); @@ -950,8 +950,7 @@ struct page *get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid) struct page *page; int err; repeat: - page = grab_cache_page_write_begin(NODE_MAPPING(sbi), - nid, AOP_FLAG_NOFS); + page = grab_cache_page(NODE_MAPPING(sbi), nid); if (!page) return ERR_PTR(-ENOMEM); @@ -1562,6 +1561,7 @@ static void recover_inline_xattr(struct inode *inode, struct page *page) src_addr = inline_xattr_addr(page); inline_size = inline_xattr_size(inode); + f2fs_wait_on_page_writeback(ipage, NODE); memcpy(dst_addr, src_addr, inline_size); update_inode(inode, ipage); |