From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: majianpeng <majianpeng@gmail.com>, tj <tj@kernel.org>,
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 10:47:02 -0700 [thread overview]
Message-ID: <20130926174702.GA12274@infradead.org> (raw)
In-Reply-To: <20130925224351.GJ26872@dastard>
On Thu, Sep 26, 2013 at 08:43:51AM +1000, Dave Chinner wrote:
> 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.
The problem is even worse than that, and it's the lack of a proper
refcounting on the bdi as seen by gems like bdi_prune_sb and the moving
of writeback requests in bdi_destroy. The right fix is to dynamically
allocate the bdi (or at least the bdi_writeback), and make sure that we
keep it around as long as a filesystem and thus the writeback code
refers to. Then a block device going away can just set a flag to stop
writeback from trying instead of having the bdi ripped out underneath
it which is guaranteed to fail and historically has failed in a large
number of misterious ways.
next prev parent reply other threads:[~2013-09-26 17:47 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
2013-09-26 17:47 ` Christoph Hellwig [this message]
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=20130926174702.GA12274@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=majianpeng@gmail.com \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.