From: Jan Kara <jack@suse.cz>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Jan Kara <jack@suse.cz>,
linux-block@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
Laurent Dufour <ldufour@linux.vnet.ibm.com>
Subject: Re: [PATCH 0/4 RFC] BDI lifetime fix
Date: Mon, 30 Jan 2017 18:19:56 +0100 [thread overview]
Message-ID: <20170130171956.GF23022@quack2.suse.cz> (raw)
In-Reply-To: <CAPcyv4hJR_4WZFhKkfbnAz0iLtu-bgSJVE804+ywaFTeYC51bQ@mail.gmail.com>
On Thu 26-01-17 22:15:06, Dan Williams wrote:
> On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara <jack@suse.cz> wrote:
> > Hello,
> >
> > this patch series attempts to solve the problems with the life time of a
> > backing_dev_info structure. Currently it lives inside request_queue structure
> > and thus it gets destroyed as soon as request queue goes away. However
> > the block device inode still stays around and thus inode_to_bdi() call on
> > that inode (e.g. from flusher worker) may happen after request queue has been
> > destroyed resulting in oops.
> >
> > This patch set tries to solve these problems by making backing_dev_info
> > independent structure referenced from block device inode. That makes sure
> > inode_to_bdi() cannot ever oops. The patches are lightly tested for now
> > (they boot, basic tests with adding & removing loop devices seem to do what
> > I'd expect them to do ;). If someone is able to reproduce crashes on bdi
> > when device goes away, please test these patches.
>
> This survives a several runs of the libnvdimm unit tests which stress
> del_gendisk() and blk_cleanup_queue(). I'll keep testing since the
> failure was intermittent, but this is looking good.
Thanks for testing!
> > I'd also appreciate if people had a look whether the approach I took looks
> > sensible.
>
> Looks sensible, just the kref comment.
>
> I also don't see a need to try to tag on the bdi device name reuse
> into this series. I'm wondering if we can handle that separately with
> device_rename(bdi->dev, ...) when we know scsi is done with the old
> bdi but it has not finished being deleted
Do you mean I should not speak about it in the changelog? The problems I
have are not as much with reusing device *name* here (and resulting sysfs
conflicts) but rather a major:minor number pair which results in reusing
block device inode and we are not prepared for that since the bdi
associated with that inode may be already unregistered and reusing it would
be difficult.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2017-01-30 17:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 17:45 [PATCH 0/4 RFC] BDI lifetime fix Jan Kara
2017-01-26 17:45 ` [PATCH 1/4] block: Unhash block device inodes on gendisk destruction Jan Kara
2017-01-26 17:45 ` [PATCH 2/4] block: Use pointer to backing_dev_info from request_queue Jan Kara
2017-01-26 17:45 ` [PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info Jan Kara
2017-01-26 20:41 ` Dan Williams
2017-01-30 12:47 ` Jan Kara
2017-01-26 17:45 ` [PATCH 4/4] block: Make blk_get_backing_dev_info() safe without open bdev Jan Kara
2017-01-27 6:15 ` [PATCH 0/4 RFC] BDI lifetime fix Dan Williams
2017-01-27 19:49 ` Omar Sandoval
2017-01-30 17:19 ` Jan Kara [this message]
2017-01-30 17:27 ` Dan Williams
2017-01-31 11:20 ` Jan Kara
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=20170130171956.GF23022@quack2.suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=bauerman@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-block@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