All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sahitya Tummala <stummala@codeaurora.org>
To: guoweichao <guoweichao@huawei.com>
Cc: jaegeuk@kernel.org, heyunlei@huawei.com,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH v4] f2fs: support in-memory inode checksum when checking consistency
Date: Tue, 13 Mar 2018 15:59:22 +0530	[thread overview]
Message-ID: <20180313102922.GB27687@codeaurora.org> (raw)
In-Reply-To: <3a0789e6-1499-0538-0e08-b978f77a22f0@huawei.com>

On Tue, Mar 13, 2018 at 05:19:51PM +0800, guoweichao wrote:
> 
> 
> On 2018/3/13 16:49, Sahitya Tummala wrote:
> > On Thu, Mar 08, 2018 at 05:10:40AM +0800, Weichao Guo wrote:
> >> @@ -159,8 +162,12 @@ bool f2fs_inode_chksum_verify(struct f2fs_sb_info *sbi, struct page *page)
> >>  	struct f2fs_inode *ri;
> >>  	__u32 provided, calculated;
> >>  
> >> +#ifdef CONFIG_F2FS_CHECK_FS
> >> +	if (!f2fs_enable_inode_chksum(sbi, page))
> >> +#else
> >>  	if (!f2fs_enable_inode_chksum(sbi, page) ||
> >>  			PageDirty(page) || PageWriteback(page))
> > 
> > I see that f2fs_inode_chksum_set() is set only if CONFIG_F2FS_CHECK_FS is
> f2fs_inode_chksum_set is also called in allocate_data_block when fs write back inode to disk.

yes, I got it now. Thanks for providing the clarification.

> > enabled. So in this #else case, if sb has inode checksum enabled but
> > PageDirty() or PageWriteback() is not set, then we may proceed below and do
> So when the inode is read from disk, e.g. PageDirty / PageWriteback is not set,
> the checksum verify process should be ok.
> > the comparison between provided and calculated check sum and it may fail
> > resulting into checksum invalid error?
> > 

--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

      reply	other threads:[~2018-03-13 10:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 21:10 [PATCH v4] f2fs: support in-memory inode checksum when checking consistency Weichao Guo
2018-03-08  6:15 ` Chao Yu
     [not found]   ` <3553bd60-494f-92a0-7368-aacd6bfd3f99@huawei.com>
2018-03-08  9:11     ` Chao Yu
2018-03-08 13:22       ` guoweichao
2018-03-13  8:49 ` Sahitya Tummala
2018-03-13  9:19   ` guoweichao
2018-03-13 10:29     ` Sahitya Tummala [this message]

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=20180313102922.GB27687@codeaurora.org \
    --to=stummala@codeaurora.org \
    --cc=guoweichao@huawei.com \
    --cc=heyunlei@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.