f2fs: support in-memory inode checksum when checking consistency
Enable in-memory inode checksum to protect metadata blocks from in-memory scribbles when checking consistency, which has no performance requirements. Signed-off-by: Weichao Guo <guoweichao@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -444,6 +444,10 @@ static inline void set_mark(struct page *page, int mark, int type)
|
||||
else
|
||||
flag &= ~(0x1 << type);
|
||||
rn->footer.flag = cpu_to_le32(flag);
|
||||
|
||||
#ifdef CONFIG_F2FS_CHECK_FS
|
||||
f2fs_inode_chksum_set(F2FS_P_SB(page), page);
|
||||
#endif
|
||||
}
|
||||
#define set_dentry_mark(page, mark) set_mark(page, mark, DENT_BIT_SHIFT)
|
||||
#define set_fsync_mark(page, mark) set_mark(page, mark, FSYNC_BIT_SHIFT)
|
||||
|
Reference in New Issue
Block a user