diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-13 19:52:35 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-06-13 20:04:45 -0400 |
commit | 354a3399dc6f7e556d04e1c731cd50e08eeb44bd (patch) | |
tree | 755e9c85c22dd0aa8dfdfc204e5697afd99b67af /fs/f2fs/node.h | |
parent | b25958b6ecf1dce087e62b9aa27cf8f2fe9b5c86 (diff) |
f2fs: recover wrong pino after checkpoint during fsync
If a file is linked, f2fs loose its parent inode number so that fsync calls
for the linked file should do checkpoint all the time.
But, if we can recover its parent inode number after the checkpoint, we can
adjust roll-forward mechanism for the further fsync calls, which is able to
improve the fsync performance significatly.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r-- | fs/f2fs/node.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index a503661307db..c65fb4f4230f 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h | |||
@@ -285,10 +285,17 @@ static inline void set_file(struct inode *inode, int type) | |||
285 | F2FS_I(inode)->i_advise |= type; | 285 | F2FS_I(inode)->i_advise |= type; |
286 | } | 286 | } |
287 | 287 | ||
288 | #define is_cold_file(inode) is_file(inode, FADVISE_COLD_BIT) | 288 | static inline void clear_file(struct inode *inode, int type) |
289 | #define is_cp_file(inode) is_file(inode, FADVISE_CP_BIT) | 289 | { |
290 | #define set_cold_file(inode) set_file(inode, FADVISE_COLD_BIT) | 290 | F2FS_I(inode)->i_advise &= ~type; |
291 | #define set_cp_file(inode) set_file(inode, FADVISE_CP_BIT) | 291 | } |
292 | |||
293 | #define file_is_cold(inode) is_file(inode, FADVISE_COLD_BIT) | ||
294 | #define file_wrong_pino(inode) is_file(inode, FADVISE_LOST_PINO_BIT) | ||
295 | #define file_set_cold(inode) set_file(inode, FADVISE_COLD_BIT) | ||
296 | #define file_lost_pino(inode) set_file(inode, FADVISE_LOST_PINO_BIT) | ||
297 | #define file_clear_cold(inode) clear_file(inode, FADVISE_COLD_BIT) | ||
298 | #define file_got_pino(inode) clear_file(inode, FADVISE_LOST_PINO_BIT) | ||
292 | 299 | ||
293 | static inline int is_cold_data(struct page *page) | 300 | static inline int is_cold_data(struct page *page) |
294 | { | 301 | { |