diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-04-29 04:28:32 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-05-06 21:21:58 -0400 |
commit | 54b591dfda1f5ab0bc2a9ce1bee5364110168777 (patch) | |
tree | 7f7f2ad061083fad401fcbc96728817e3cbe790e /fs/f2fs/xattr.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/xattr.c')
-rw-r--r-- | fs/f2fs/xattr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 6073f9f88416..1f546b4b6b61 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c | |||
@@ -349,6 +349,7 @@ static inline int write_all_xattrs(struct inode *inode, __u32 hsize, | |||
349 | 349 | ||
350 | if (ipage) { | 350 | if (ipage) { |
351 | inline_addr = inline_xattr_addr(ipage); | 351 | inline_addr = inline_xattr_addr(ipage); |
352 | f2fs_wait_on_page_writeback(ipage, NODE); | ||
352 | } else { | 353 | } else { |
353 | page = get_node_page(sbi, inode->i_ino); | 354 | page = get_node_page(sbi, inode->i_ino); |
354 | if (IS_ERR(page)) { | 355 | if (IS_ERR(page)) { |
@@ -356,6 +357,7 @@ static inline int write_all_xattrs(struct inode *inode, __u32 hsize, | |||
356 | return PTR_ERR(page); | 357 | return PTR_ERR(page); |
357 | } | 358 | } |
358 | inline_addr = inline_xattr_addr(page); | 359 | inline_addr = inline_xattr_addr(page); |
360 | f2fs_wait_on_page_writeback(page, NODE); | ||
359 | } | 361 | } |
360 | memcpy(inline_addr, txattr_addr, inline_size); | 362 | memcpy(inline_addr, txattr_addr, inline_size); |
361 | f2fs_put_page(page, 1); | 363 | f2fs_put_page(page, 1); |
@@ -376,6 +378,7 @@ static inline int write_all_xattrs(struct inode *inode, __u32 hsize, | |||
376 | return PTR_ERR(xpage); | 378 | return PTR_ERR(xpage); |
377 | } | 379 | } |
378 | f2fs_bug_on(new_nid); | 380 | f2fs_bug_on(new_nid); |
381 | f2fs_wait_on_page_writeback(xpage, NODE); | ||
379 | } else { | 382 | } else { |
380 | struct dnode_of_data dn; | 383 | struct dnode_of_data dn; |
381 | set_new_dnode(&dn, inode, NULL, NULL, new_nid); | 384 | set_new_dnode(&dn, inode, NULL, NULL, new_nid); |