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:
Jaegeuk Kim
2013-03-21 15:21:57 +09:00
parent fa37241743
commit 953a3e27e1
4 changed files with 28 additions and 25 deletions

View File

@@ -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);