From: Chao Yu <chao@kernel.org>
To: Chao Yu <yuchao0@huawei.com>, Weichao Guo <guoweichao@huawei.com>,
jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH v6] f2fs: support in-memory inode checksum when checking consistency
Date: Sun, 15 Jul 2018 14:38:14 +0800 [thread overview]
Message-ID: <2dc827b6-d8a6-b12f-edfe-c34df262df91@kernel.org> (raw)
In-Reply-To: <b1c343b0-671e-283d-9f8c-9ac5005a13ff@huawei.com>
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:
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 <guoweichao@huawei.com>
>
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>
> Thanks,
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2018-07-15 6:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 15:10 [PATCH v6] f2fs: support in-memory inode checksum when checking consistency Weichao Guo
2018-03-09 12:32 ` Chao Yu
2018-06-12 14:36 ` Chao Yu
2018-06-22 7:16 ` Chao Yu
2018-07-15 6:38 ` Chao Yu [this message]
2018-07-23 11:21 ` Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2dc827b6-d8a6-b12f-edfe-c34df262df91@kernel.org \
--to=chao@kernel.org \
--cc=guoweichao@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).