From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: Brian Foster <bfoster@redhat.com>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] generic: test race between block map change and writeback
Date: Tue, 10 Oct 2017 16:24:59 +1100 [thread overview]
Message-ID: <20171010052459.GB15067@dastard> (raw)
In-Reply-To: <20171010043649.GI10593@eguan.usersys.redhat.com>
On Tue, Oct 10, 2017 at 12:36:49PM +0800, Eryu Guan wrote:
> On Mon, Oct 09, 2017 at 12:12:55PM -0400, Brian Foster wrote:
> > On Thu, Aug 31, 2017 at 12:02:37PM +0800, Eryu Guan wrote:
> > > Run delalloc writes & append writes & non-data-integrity syncs
> > > concurrently to test the race between block map change vs writeback.
> > >
> > > This is to cover an XFS bug that data could be written to wrong
> > > block and delay allocated blocks are leaked because the block map
> > > was changed due to the removal of speculative allocated eofblocks
> > > when writeback is in progress.
> > >
> > > And this test partially mimics what lustre-racer[1] test does, using
> > > which this bug was first found.
> > >
> > > [1] https://git.hpdd.intel.com/?p=fs/lustre-release.git;a=tree;f=lustre/tests/racer;hb=HEAD
> > >
> > > Signed-off-by: Eryu Guan <eguan@redhat.com>
> > > ---
> > >
> > > This may not reproduce the bug on all hosts, but it does reproduce the XFS
> > > corruption issue reliably on my different test hosts.
> > >
> >
> > Was this problem fixed already or are we still waiting on a fix?
>
> It's still an unfixed problem. Dave provided a test patch (which did fix
> the bug for me)
The test patch I provided broken the COW writeback path, primarily
because it's a separate mapping path and the change I made doesn't
work at all well with it....
> then Christoph suggested a fix based on seqlock, and
> things stalled there.
I had a look at doing that and got stalled on the fact that, again,
the COW writeback is completely separate to the existing block
mapping during writeback path and so applying a seqlock algorithm is
pretty difficult.
Basically, to fix the problem, we first need to merge the COW and
delalloc paths in the writepage code and then we'll have a sane base
on which to apply a proper fix...
(we need to do this to get rid of the bufferhead dependency, anyway)
> (I'm happy to pick up the work, but I'm not that
> familiar with all the allocation paths that could change the extent map,
> so I may need some guidance and time to play with it.)
There's some black magic in amongst it all. I'll spend some time on
it again over the next week and see what I come up with...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-10-10 5:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 4:02 [PATCH] generic: test race between block map change and writeback Eryu Guan
2017-10-09 8:17 ` Eryu Guan
2017-10-09 16:12 ` Brian Foster
2017-10-10 4:36 ` Eryu Guan
2017-10-10 5:24 ` Dave Chinner [this message]
2017-10-10 10:56 ` Brian Foster
2017-10-11 5:30 ` Dave Chinner
2017-10-11 9:45 ` Brian Foster
2017-10-11 10:42 ` Dave Chinner
2017-10-11 13:47 ` Brian Foster
2017-10-11 10:33 ` Eryu Guan
2017-10-10 12:44 ` Xiong Zhou
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=20171010052459.GB15067@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@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).