diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-25 14:57:05 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-02-23 01:07:23 +0100 |
commit | 2049d4fcb057c263929bec480f2db079d25fd601 (patch) | |
tree | e9dbf53cb32e866f49cea252fe84dde9837ada4a /fs/f2fs/node.h | |
parent | f2fs: do f2fs_balance_fs when block is allocated (diff) | |
download | linux-2049d4fcb057c263929bec480f2db079d25fd601.tar.xz linux-2049d4fcb057c263929bec480f2db079d25fd601.zip |
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/node.h')
-rw-r--r-- | fs/f2fs/node.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index 56c451921522..8f405d243e49 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -379,6 +379,21 @@ static inline int is_node(struct page *page, int type) #define is_fsync_dnode(page) is_node(page, FSYNC_BIT_SHIFT) #define is_dent_dnode(page) is_node(page, DENT_BIT_SHIFT) +static inline int is_inline_node(struct page *page) +{ + return PageChecked(page); +} + +static inline void set_inline_node(struct page *page) +{ + SetPageChecked(page); +} + +static inline void clear_inline_node(struct page *page) +{ + ClearPageChecked(page); +} + static inline void set_cold_node(struct inode *inode, struct page *page) { struct f2fs_node *rn = F2FS_NODE(page); |