From: Eryu Guan <eguan@linux.alibaba.com>
To: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Eryu Guan <guan@eryu.me>,
fstests@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-bcachefs@vger.kernel.org,
Kent Overstreet <kmo@daterainc.com>
Subject: Re: [PATCH 1/3] Initial bcachefs support
Date: Mon, 24 May 2021 11:56:04 +0800 [thread overview]
Message-ID: <20210524035604.GD60846@e18g06458.et15sqa> (raw)
In-Reply-To: <YKrchSzj8Zo4CnDs@moria.home.lan>
On Sun, May 23, 2021 at 06:51:49PM -0400, Kent Overstreet wrote:
[snip]
> > > ;;
> > > @@ -1179,6 +1197,19 @@ _repair_scratch_fs()
> > > fi
> > > return $res
> > > ;;
> > > + bcachefs)
> > > + fsck -t $FSTYP -n $SCRATCH_DEV 2>&1
> >
> > _repair_scratch_fs() is supposed to actually fix the errors, does
> > "fsck -n" fix errors for bcachefs?
>
> No - but with bcachefs fsck finding errors _always_ indicates a bug, so for the
> purposes of these tests I think this is the right thing to do - I don't want the
> tests to pass if fsck is finding and fixing errors.
Then _check_scratch_fs() should be used instead, which will fail the
test if any fsck finds any corruptions. _repair_scratch_fs() is meant to
fix errors, and only report failure when there's unfixable errors.
Thanks,
Eryu
>
> > > diff --git a/tests/generic/042 b/tests/generic/042
> > > index 35727bcbc6..42919e2313 100755
> > > --- a/tests/generic/042
> > > +++ b/tests/generic/042
> > > @@ -63,7 +63,8 @@ _crashtest()
> > >
> > > # We should /never/ see 0xCD in the file, because we wrote that pattern
> > > # to the filesystem image to expose stale data.
> > > - if hexdump -v -e '/1 "%02X "' $file | grep -q "CD"; then
> > > + # The file is not required to exist since we didn't sync before going down:
> > > + if [[ -f $file ]] && hexdump -v -e '/1 "%02X "' $file | grep -q "CD"; then
> > > echo "Saw stale data!!!"
> > > hexdump $file
> > > fi
> >
> > Updates for individual test should be in a separate patch.
>
> Ok, I'll split those out.
next prev parent reply other threads:[~2021-05-24 3:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-27 16:44 [PATCH 0/3] bcachefs support Kent Overstreet
2021-04-27 16:44 ` [PATCH 1/3] Initial " Kent Overstreet
2021-05-09 14:36 ` Eryu Guan
2021-05-23 22:51 ` Kent Overstreet
2021-05-24 3:56 ` Eryu Guan [this message]
2021-05-24 4:04 ` Kent Overstreet
2021-05-24 4:22 ` Eryu Guan
2021-05-24 4:48 ` Kent Overstreet
2021-04-27 16:44 ` [PATCH 2/3] Improved .gitignore Kent Overstreet
2021-04-27 16:44 ` [PATCH 3/3] Use --yes option to lvcreate Kent Overstreet
2021-04-27 17:03 ` Eryu Guan
2021-04-27 20:29 ` Kent Overstreet
2021-04-27 20:43 ` Matthew Wilcox
2021-04-27 21:02 ` Eric Biggers
2021-04-27 21:18 ` Kent Overstreet
2021-05-09 14:20 ` [PATCH 0/3] bcachefs support Eryu Guan
2021-05-10 23:14 ` Dave Chinner
2021-05-11 1:26 ` Darrick J. Wong
2021-05-16 13:54 ` Eryu Guan
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=20210524035604.GD60846@e18g06458.et15sqa \
--to=eguan@linux.alibaba.com \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=kent.overstreet@gmail.com \
--cc=kmo@daterainc.com \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).