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/inline.c | |
parent | 8aa6f1c5bd7043734fff1961a4795da9cc5d0f50 (diff) |
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/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index d215dbb09f07..8bf34f052f67 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -156,6 +156,7 @@ int f2fs_write_inline_data(struct inode *inode, return err; ipage = dn.inode_page; + f2fs_wait_on_page_writeback(ipage, NODE); zero_user_segment(ipage, INLINE_DATA_OFFSET, INLINE_DATA_OFFSET + MAX_INLINE_DATA); src_addr = kmap(page); @@ -188,6 +189,8 @@ void truncate_inline_data(struct inode *inode, u64 from) if (IS_ERR(ipage)) return; + f2fs_wait_on_page_writeback(ipage, NODE); + zero_user_segment(ipage, INLINE_DATA_OFFSET + from, INLINE_DATA_OFFSET + MAX_INLINE_DATA); set_page_dirty(ipage); @@ -218,6 +221,8 @@ process_inline: ipage = get_node_page(sbi, inode->i_ino); f2fs_bug_on(IS_ERR(ipage)); + f2fs_wait_on_page_writeback(ipage, NODE); + src_addr = inline_data_addr(npage); dst_addr = inline_data_addr(ipage); memcpy(dst_addr, src_addr, MAX_INLINE_DATA); @@ -229,6 +234,7 @@ process_inline: if (f2fs_has_inline_data(inode)) { ipage = get_node_page(sbi, inode->i_ino); f2fs_bug_on(IS_ERR(ipage)); + f2fs_wait_on_page_writeback(ipage, NODE); zero_user_segment(ipage, INLINE_DATA_OFFSET, INLINE_DATA_OFFSET + MAX_INLINE_DATA); clear_inode_flag(F2FS_I(inode), FI_INLINE_DATA); |