diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-03-21 15:21:57 +0900 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-06-05 21:20:08 +0200 |
commit | 0cba64866db3b25843672aae383fc1d2ebf33ac4 (patch) | |
tree | 5e52eb8d43114286981624e920aa3fb4f41cc10d /fs/f2fs/node.h | |
parent | 45002590994ad6a5a8b149704494c25eb0c81af6 (diff) | |
download | kernel_samsung_espresso10-0cba64866db3b25843672aae383fc1d2ebf33ac4.zip kernel_samsung_espresso10-0cba64866db3b25843672aae383fc1d2ebf33ac4.tar.gz kernel_samsung_espresso10-0cba64866db3b25843672aae383fc1d2ebf33ac4.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>
Conflicts:
fs/f2fs/file.c
Change-Id: I1c9798ad495bedbe7589d5146207dda2a51e812a
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 afdb130..d009cdf 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); |