From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] btrfs: verify data checksum during _check_btrfs_filesystem()
Date: Tue, 13 Jun 2023 16:10:31 +0800 [thread overview]
Message-ID: <ff5bcfe0-a2c7-c987-b19a-e50dd2c8b6f8@suse.com> (raw)
In-Reply-To: <61bb187a554ff0397665a8898ca2bd56419b6944.1686640441.git.wqu@suse.com>
On 2023/6/13 15:14, Qu Wenruo wrote:
> By default btrfs only checks the metadata consistency, but sometimes if
> we have some corruption in data while the test case doesn't utilize
> scrub to verify, or there is some bugs in scrub itself, we will not
> detect those problems.
>
> So here we do one step further by utilizing --check-data-csum option, so
> that if there is some data corruption, we can detect them early.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
This is a little overkilled, for example btrfs/215 intentionally corrupt
some data for testing, thus this would cause false alerts.
I'll try to find a way to append options so that test cases can
determine if they want checksum verification case by case.
Thanks,
Qu
> ---
> common/btrfs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/btrfs b/common/btrfs
> index bd4dc31fa5a8..be8ac04cd9a3 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -144,7 +144,7 @@ _check_btrfs_filesystem()
> rm -f $tmp.qgroup_report
> fi
>
> - $BTRFS_UTIL_PROG check $device >$tmp.fsck 2>&1
> + $BTRFS_UTIL_PROG check --check-data-csum $device >$tmp.fsck 2>&1
> if [ $? -ne 0 ]; then
> _log_err "_check_btrfs_filesystem: filesystem on $device is inconsistent"
> echo "*** fsck.$FSTYP output ***" >>$seqres.full
prev parent reply other threads:[~2023-06-13 8:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 7:14 [PATCH] btrfs: verify data checksum during _check_btrfs_filesystem() Qu Wenruo
2023-06-13 8:10 ` Qu Wenruo [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=ff5bcfe0-a2c7-c987-b19a-e50dd2c8b6f8@suse.com \
--to=wqu@suse.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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