From: Josef Bacik <josef@toxicpanda.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Josef Bacik <josef@toxicpanda.com>, Josef Bacik <jbacik@fb.com>,
fstests <fstests@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Eryu Guan <eguan@redhat.com>
Subject: Re: [PATCH v3 10/13] fstests: crash consistency fsx test using dm-log-writes
Date: Tue, 28 Nov 2017 12:21:55 -0500 [thread overview]
Message-ID: <20171128172152.ktvpnwv233govfwl@destiny> (raw)
In-Reply-To: <CAOQ4uxiGryFy7GLZUa0EWcbT+50cMfBb8a2dYa1mZ7tEf+UURg@mail.gmail.com>
On Tue, Nov 28, 2017 at 06:48:43PM +0200, Amir Goldstein wrote:
> On Mon, Nov 27, 2017 at 5:04 PM, Josef Bacik <josef@toxicpanda.com> wrote:
> > On Mon, Nov 27, 2017 at 11:56:58AM +0200, Amir Goldstein wrote:
> >> On Tue, Sep 5, 2017 at 10:11 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> >> > Cherry-picked the test from commit 70d41e17164b
> >> > in Josef Bacik's fstests tree (https://github.com/josefbacik/fstests).
> >> > Quoting from Josef's commit message:
> >> >
> >> > The test just runs some ops and exits, then finds all of the good buffers
> >> > in the directory we provided and:
> >> > - replays up to the mark given
> >> > - mounts the file system and compares the md5sum
> >> > - unmounts and fsck's to check for metadata integrity
> >> >
> >> > dm-log-writes will pretend to do discard and the replay-log tool will
> >> > replay it properly depending on the underlying device, either by writing
> >> > 0's or actually calling the discard ioctl, so I've enabled discard in the
> >> > test for maximum fun.
> >> >
> >> > [Amir:]
> >> > - Removed unneeded _test_falloc_support dynamic FSX_OPTS
> >> > - Fold repetitions into for loops
> >> > - Added place holders for using constant random seeds
> >> > - Add pre umount checkpint
> >> > - Add test to new 'replay' group
> >> > - Address review comments by Eryu Guan
> >> >
> >> > Cc: Josef Bacik <jbacik@fb.com>
> >> > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >>
> >>
> >> Josef,
> >>
> >> As you know, this test is now merged to xfstest as generic/455.
> >> I have been running the test for a while on xfs and it occasionally
> >> reports inconsistencies which I try to investigate.
> >>
> >> In some of the reports, it appears that dm-log-writes may be exhibiting
> >> a reliability issue (see below).
> >>
> >
> > It's not a reliability issue, its a caching issue. dm-log-writes is just
> > issuing bio's to the log device, and our destructor waits for all pending io
> > blocks to complete before exiting, so unless I've missed how dm is destroying
> > devices everything should be on disk.
> >
> > However since we replay in userspace we are going through the blockdevice's
> > pagecache, so we could have stale pages left in place which is screwing us up.
> > Will you try this patch and see if it fixes the problem? Thanks,
> >
> > Josef
> >
> >
> > diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c
> > index 8b80a9ce9ea9..1c502930af5e 100644
> > --- a/drivers/md/dm-log-writes.c
> > +++ b/drivers/md/dm-log-writes.c
> > @@ -545,6 +545,8 @@ static void log_writes_dtr(struct dm_target *ti)
> > !atomic_read(&lc->pending_blocks));
> > kthread_stop(lc->log_kthread);
> >
> > + invalidate_bdev(lc->logdev->bdev);
> > + invalidate_bdev(lc->dev->bdev);
> > WARN_ON(!list_empty(&lc->logging_blocks));
> > WARN_ON(!list_empty(&lc->unflushed_blocks));
> > dm_put_device(ti, lc->dev);
>
> Josef,
>
> With your patch OR with my xfstest patch that adds "sync" I did not yet see
> another problem of garbage fs after _log_writes_remove.
>
> I did however, encounter this error (failure to verify read data during fsx)
> from scratch/log-writes device (see attached full log).
>
> I will keep running the test to collect more information.
>
That failure I'll lay at the feet of whatever fs you are testing ;). I'm glad
my patch fixed the replay problem, I'll send that up. Thanks,
Josef
next prev parent reply other threads:[~2017-11-28 17:21 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 19:11 [PATCH v3 00/13] Crash consistency xfstest using dm-log-writes Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 01/13] fsx: add support for integrity check with dm-log-writes target Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 02/13] fsx: add optional logid prefix to log messages Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 03/13] fsx: add support for recording operations to a file Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 04/13] fsx: add support for writing constant instead of random data Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 05/13] fsx: add support for keeping existing file Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 06/13] log-writes: add replay-log program to replay dm-log-writes target Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 07/13] replay-log: add validations for corrupt log entries Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 08/13] replay-log: add support for replaying ops in target device sector range Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 09/13] fstests: add support for working with dm-log-writes target Amir Goldstein
2017-09-07 7:45 ` Eryu Guan
2017-09-07 7:47 ` Eryu Guan
2017-09-05 19:11 ` [PATCH v3 10/13] fstests: crash consistency fsx test using dm-log-writes Amir Goldstein
2017-09-07 7:50 ` Eryu Guan
2017-09-07 8:50 ` Amir Goldstein
2017-09-07 8:55 ` Eryu Guan
2017-09-07 10:10 ` Amir Goldstein
2017-11-27 9:56 ` Amir Goldstein
2017-11-27 14:23 ` Ashlie Martinez
2017-11-27 15:07 ` Josef Bacik
2017-11-27 15:04 ` Josef Bacik
2017-11-28 16:48 ` Amir Goldstein
2017-11-28 17:21 ` Josef Bacik [this message]
2017-11-28 19:32 ` Amir Goldstein
2017-11-28 20:00 ` Josef Bacik
2017-11-28 20:26 ` Amir Goldstein
[not found] ` <CAOQ4uxhQu-1AK71zg4Ce0cJd+xRt3Gf9zMMVb=Rs00zFuWA3hQ@mail.gmail.com>
2017-11-28 22:33 ` Darrick J. Wong
2017-11-29 3:33 ` Amir Goldstein
[not found] ` <CAOQ4uxhXWxkre7L7RDvpH8E4cwsHGZzVHKmCpBESfTUZhmQpUg@mail.gmail.com>
[not found] ` <CAOQ4uxjBQ9ZzPe9GKCRYCjNFv3jP8NMAVQDb=LiNqNcEeRp47w@mail.gmail.com>
2017-12-04 20:53 ` Darrick J. Wong
2017-09-05 19:11 ` [PATCH v3 11/13] fstests: regression test for ext4 crash consistency bug Amir Goldstein
2017-09-07 7:52 ` Eryu Guan
2017-09-05 19:11 ` [PATCH v3 12/13] fstests: crash consistency fsx test for cloned files Amir Goldstein
2017-09-05 19:11 ` [PATCH v3 13/13] fstests: regression test for xfs leftover CoW extent error Amir Goldstein
2017-09-07 7:55 ` Eryu Guan
2017-09-07 9:34 ` Amir Goldstein
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=20171128172152.ktvpnwv233govfwl@destiny \
--to=josef@toxicpanda.com \
--cc=amir73il@gmail.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=jbacik@fb.com \
--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