On 07/15, Chao Yu wrote: > Hi Weichao and Jaegeuk, > > On 2018/6/22 15:16, Chao Yu wrote: > > On 2018/6/12 22:36, Chao Yu wrote: > >> Ping, > >> > >> Jaegeuk, sometimes, we suffer data corruption caused by bit-transition of > >> cache, > >> we troubleshoot for weeks or months, and finally, find that it is caused by > >> hardware. So for this case, maybe in-memory checksum can help to > >> troubleshoot > >> more quickly. > > I encounter mismatch on checksum when I test generic/475, I think we should > add > missing calculation in below place:
Hi Chao, I added the below. Thanks, > > diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h > index b0da4c2..0f4db7a 100644 > --- a/fs/f2fs/node.h > +++ b/fs/f2fs/node.h > @@ -449,6 +449,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) > > >> > >> Could you consider this? > >> > >> Thanks, > >> > >> On 2018/3/9 23:10, Weichao Guo wrote: > >>> 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 <[email protected]> > > > > Reviewed-by: Chao Yu <[email protected]> > > > > Thanks, > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
