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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user