diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-20 16:32:49 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-02 18:05:12 -0700 |
commit | ee6d182f2a19d5d44607b5ae4bec523726d76a99 (patch) | |
tree | 514092851eb0e974c6ac8add90fed10056b84998 /fs/f2fs/node.c | |
parent | 0f18b462b2e5aff64b8638e8a47284b907351ef3 (diff) | |
download | linux-ee6d182f2a19d5d44607b5ae4bec523726d76a99.tar.bz2 |
f2fs: remove syncing inode page in all the cases
This patch reduces to call them across the whole tree.
- sync_inode_page()
- update_inode_page()
- update_inode()
- f2fs_write_inode()
Instead, checkpoint will flush all the dirty inode metadata before syncing
node pages.
Note that, this is doable, since we call mark_inode_dirty_sync() for all
inode's field change which needs to update on-disk inode as well.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1965351b644c..82f0f833151e 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -671,8 +671,6 @@ static void truncate_node(struct dnode_of_data *dn) remove_orphan_inode(sbi, dn->nid); dec_valid_inode_count(sbi); f2fs_inode_synced(dn->inode); - } else { - sync_inode_page(dn); } invalidate: clear_node_page_dirty(dn->node_page); @@ -1050,14 +1048,8 @@ struct page *new_node_page(struct dnode_of_data *dn, if (f2fs_has_xattr_block(ofs)) f2fs_i_xnid_write(dn->inode, dn->nid); - dn->node_page = page; - if (ipage) - update_inode(dn->inode, ipage); - else - sync_inode_page(dn); if (ofs == 0) inc_valid_inode_count(sbi); - return page; fail: @@ -1176,24 +1168,6 @@ struct page *get_node_page_ra(struct page *parent, int start) return __get_node_page(sbi, nid, parent, start); } -void sync_inode_page(struct dnode_of_data *dn) -{ - int ret = 0; - - if (IS_INODE(dn->node_page) || dn->inode_page == dn->node_page) { - ret = update_inode(dn->inode, dn->node_page); - } else if (dn->inode_page) { - if (!dn->inode_page_locked) - lock_page(dn->inode_page); - ret = update_inode(dn->inode, dn->inode_page); - if (!dn->inode_page_locked) - unlock_page(dn->inode_page); - } else { - ret = update_inode_page(dn->inode); - } - dn->node_changed = ret ? true: false; -} - static void flush_inline_data(struct f2fs_sb_info *sbi, nid_t ino) { struct inode *inode; @@ -2003,8 +1977,6 @@ recover_xnid: /* 3: update xattr blkaddr */ refresh_sit_entry(sbi, NEW_ADDR, blkaddr); set_node_addr(sbi, &ni, blkaddr, false); - - update_inode_page(inode); } int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) |