aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-21 02:21:57 -0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-26 20:16:25 -0400
commit953a3e27e10fc6acb480801ea47197d0270d735e (patch)
tree8ff66198318ee79464b9ac47e8ee091acf140c20 /fs/f2fs/node.h
parentfa37241743ac26ba0ac6f54579158c2fae310a5c (diff)
f2fs: fix to give correct parent inode number for roll forward
When we recover fsync'ed data after power-off-recovery, we should guarantee that any parent inode number should be correct for each direct inode blocks. So, let's make the following rules. - The fsync should do checkpoint to all the inodes that were experienced hard links. - So, the only normal files can be recovered by roll-forward. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index afdb130f782e..d009cdfd2679 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -277,6 +277,21 @@ static inline int is_cold_file(struct inode *inode)
277 return F2FS_I(inode)->i_advise & FADVISE_COLD_BIT; 277 return F2FS_I(inode)->i_advise & FADVISE_COLD_BIT;
278} 278}
279 279
280static inline void set_cold_file(struct inode *inode)
281{
282 F2FS_I(inode)->i_advise |= FADVISE_COLD_BIT;
283}
284
285static inline int is_cp_file(struct inode *inode)
286{
287 return F2FS_I(inode)->i_advise & FADVISE_CP_BIT;
288}
289
290static inline void set_cp_file(struct inode *inode)
291{
292 F2FS_I(inode)->i_advise |= FADVISE_CP_BIT;
293}
294
280static inline int is_cold_data(struct page *page) 295static inline int is_cold_data(struct page *page)
281{ 296{
282 return PageChecked(page); 297 return PageChecked(page);