From: tj <tj@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: majianpeng <majianpeng@gmail.com>, axboe <axboe@kernel.dk>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RESEND PATCH] writeback: Judge bdi->dev when set worker desc in bdi_writeback_workfn.
Date: Thu, 26 Sep 2013 09:35:05 -0400 [thread overview]
Message-ID: <20130926133505.GB2480@htj.dyndns.org> (raw)
In-Reply-To: <20130925224351.GJ26872@dastard>
Hey,
On Thu, Sep 26, 2013 at 08:43:51AM +1000, Dave Chinner wrote:
> On Wed, Sep 25, 2013 at 04:08:54PM +0800, majianpeng wrote:
> > Hi,
> > How about this patch?
> > This bug can easily to reproduce.
> > dd if=/dev/zero of=/dev/sdb bs=64k
> > For a while, remove the disk. At my machine, it at most 100% occured.
>
> ...
> > >
> > >This bug introduced by commit ef3b101925f2170c.
> > >I think the situation is like:
> > >remove disk flush_thread_work
> > >bdi_destroy()
> > > bdi_unregister()
> > > bdi->dev = NULL
> > > bdi_writeback_workfn()
>
> You're just papering over the larger problem, in that the writeback
> work is running concurrently with the bdi_unregister() function that
> is tearing the bdi down. You should try to fix the underlying race
> condition, as documented in bdi_destroy.
Given that it's a fix for a reliably reproducible oops, I think
papering over is better than nothing as long as it's clearly labeled
as such. Jianpeng, can you please make it clear both in the
description and patch that this is a bandaid for now and bdi shutdown
sequence needs to be fixed properly later?
Thanks.
--
tejun
next prev parent reply other threads:[~2013-09-26 13:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 0:11 [RESEND PATCH] writeback: Judge bdi->dev when set worker desc in bdi_writeback_workfn majianpeng
2013-09-25 8:08 ` majianpeng
2013-09-25 22:43 ` Dave Chinner
2013-09-26 13:35 ` tj [this message]
2013-09-26 17:47 ` Christoph Hellwig
2013-09-26 22:59 ` Dave Chinner
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=20130926133505.GB2480@htj.dyndns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=majianpeng@gmail.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;
as well as URLs for NNTP newsgroup(s).