diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-25 05:57:05 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-02-22 16:07:23 -0800 |
commit | 2049d4fcb057c263929bec480f2db079d25fd601 (patch) | |
tree | e9dbf53cb32e866f49cea252fe84dde9837ada4a /fs/f2fs/inode.c | |
parent | 3c082b7b5b28be606ed9ef11e4741df7c722c92e (diff) | |
download | linux-2049d4fcb057c263929bec480f2db079d25fd601.tar.bz2 |
f2fs: avoid multiple node page writes due to inline_data
The sceanrio is:
1. create fully node blocks
2. flush node blocks
3. write inline_data for all the node blocks again
4. flush node blocks redundantly
So, this patch tries to flush inline_data when flushing node blocks.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
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 2adeff26be11..909917150d2b 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -263,6 +263,10 @@ int update_inode(struct inode *inode, struct page *node_page) set_cold_node(inode, node_page); clear_inode_flag(F2FS_I(inode), FI_DIRTY_INODE); + /* deleted inode */ + if (inode->i_nlink == 0) + clear_inline_node(node_page); + return set_page_dirty(node_page); } |