summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-21 15:21:57 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-27 09:16:25 +0900
commit953a3e27e10fc6acb480801ea47197d0270d735e (patch)
tree8ff66198318ee79464b9ac47e8ee091acf140c20 /fs/f2fs/node.h
parentfa37241743ac26ba0ac6f54579158c2fae310a5c (diff)
downloadlinux-953a3e27e10fc6acb480801ea47197d0270d735e.tar.bz2
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)
return F2FS_I(inode)->i_advise & FADVISE_COLD_BIT;
}
+static inline void set_cold_file(struct inode *inode)
+{
+ F2FS_I(inode)->i_advise |= FADVISE_COLD_BIT;
+}
+
+static inline int is_cp_file(struct inode *inode)
+{
+ return F2FS_I(inode)->i_advise & FADVISE_CP_BIT;
+}
+
+static inline void set_cp_file(struct inode *inode)
+{
+ F2FS_I(inode)->i_advise |= FADVISE_CP_BIT;
+}
+
static inline int is_cold_data(struct page *page)
{
return PageChecked(page);