diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-10 09:17:01 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-14 09:04:43 +0900 |
commit | b3783873cc2214542d3da9a1aa800b20919d5889 (patch) | |
tree | 7b2e4f8eafd726c9c97bfde832a0178c840815a7 /fs/f2fs/inode.c | |
parent | d7cc950b4c910e4440485be784493880a0d09086 (diff) | |
download | blackbird-op-linux-b3783873cc2214542d3da9a1aa800b20919d5889.tar.gz blackbird-op-linux-b3783873cc2214542d3da9a1aa800b20919d5889.zip |
f2fs: avoid freqeunt write_inode calls
If update_inode is called, we don't need to do write_inode.
So, let's use a *dirty* flag for each inode.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index b44a4c1194ea..2b2d45d19e3e 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -192,6 +192,7 @@ void update_inode(struct inode *inode, struct page *node_page) set_cold_node(inode, node_page); set_page_dirty(node_page); + clear_inode_flag(F2FS_I(inode), FI_DIRTY_INODE); } int update_inode_page(struct inode *inode) @@ -217,6 +218,9 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc) inode->i_ino == F2FS_META_INO(sbi)) return 0; + if (!is_inode_flag_set(F2FS_I(inode), FI_DIRTY_INODE)) + return 0; + if (wbc) f2fs_balance_fs(sbi); |