From: David Sterba <dsterba@suse.cz>
To: Wang Yugui <wangyugui@e16-tech.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org,
Filipe Manana <fdmanana@gmail.com>
Subject: Re: [PATCH v3] btrfs: fix a check-integrity warning on write caching disabled disk
Date: Thu, 4 Nov 2021 19:06:46 +0100 [thread overview]
Message-ID: <20211104180646.GC28560@twin.jikos.cz> (raw)
In-Reply-To: <20211104233458.1670.409509F4@e16-tech.com>
On Thu, Nov 04, 2021 at 11:34:59PM +0800, Wang Yugui wrote:
> > On Wed, Nov 03, 2021 at 08:07:22AM +0800, Wang Yugui wrote:
> > > > On Thu, Oct 28, 2021 at 06:32:54AM +0800, Wang Yugui wrote:
> > > > > When a disk has write caching disabled, we skip submission of a bio
> > > > > with flush and sync requests before writing the superblock, since
> > > > > it's not needed. However when the integrity checker is enabled,
> > > > > this results in reports that there are metadata blocks referred
> > > > > by a superblock that were not properly flushed. So don't skip the
> > > > > bio submission only when the integrity checker is enabled
> > > > > for the sake of simplicity, since this is a debug tool and
> > > > > not meant for use in non-debug builds.
> > > > >
> > > > > xfstest/btrfs/220 trigger a check-integrity warning like the following
> > > > > when CONFIG_BTRFS_FS_CHECK_INTEGRITY=y and the disk with WCE=0.
> > > >
> > > > Does this need the integrity checker to be also enabled by mount
> > > > options? I don't think compile time (ie the #ifdef) is enough, the
> > > > message is printed only when it's enabled based on check in
> > > > __btrfsic_submit_bio "if (!btrfsic_is_initialized) return", where the
> > > > rest of the function does all the verification.
> > >
> > > Yes. We need mount option 'check_int' or 'check_int_data' to trigger
> > > this check-integrity warning.
> >
> > So the mount options need to be checked here as well.
>
> We just need to add the mount option(check_int/check_int_data) to
> changelog
>
> when CONFIG_BTRFS_FS_CHECK_INTEGRITY=y and the disk with WCE=0.
> =>
> when CONFIG_BTRFS_FS_CHECK_INTEGRITY=y , and mount
> option(check_int/check_int_data), and the disk with WCE=0.
>
>
> The check of mount option(check_int/check_int_data) is done later
> inside btrfsic_submit_bio. No necessary to check mount
> option(check_int/check_int_data) here, we just need to match
> submit_bio(linux/bio.h).
Ah right, I missed it.
next prev parent reply other threads:[~2021-11-04 18:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 22:32 [PATCH v3] btrfs: fix a check-integrity warning on write caching disabled disk Wang Yugui
2021-11-02 16:48 ` David Sterba
2021-11-03 0:07 ` Wang Yugui
2021-11-04 15:02 ` David Sterba
2021-11-04 15:34 ` Wang Yugui
2021-11-04 18:06 ` David Sterba [this message]
2021-11-04 19:24 ` David Sterba
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=20211104180646.GC28560@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=fdmanana@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangyugui@e16-tech.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