diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-25 05:57:05 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:32:52 +0200 |
| commit | 235bd921dffc71af867997a0055e4c168b23fe88 (patch) | |
| tree | 405c20020bd6fef6d0601f1610e11a6d9b964e5f /fs/f2fs/node.h | |
| parent | 1912767d5d82854aa329ed3ba171f674d9cebbcc (diff) | |
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 56c451921..8f405d243 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); |
