From: Omar Sandoval <osandov@osandov.com>
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: Fri, 27 Jan 2017 11:49:19 -0800 [thread overview]
Message-ID: <20170127194919.GA21371@vader.DHCP.thefacebook.com> (raw)
In-Reply-To: <CAPcyv4hJR_4WZFhKkfbnAz0iLtu-bgSJVE804+ywaFTeYC51bQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]
On Thu, Jan 26, 2017 at 10:15:06PM -0800, 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.
>
> > 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
What's the status of the device name issue? We're hitting it a lot here.
It's really easy to reproduce with scsi_debug, script attached. I'd be
happy to test out any patches.
[-- Attachment #2: stress_test_scsi_debug.sh --]
[-- Type: application/x-sh, Size: 1445 bytes --]
next prev parent reply other threads:[~2017-01-27 19:49 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 [this message]
2017-01-30 17:19 ` Jan Kara
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=20170127194919.GA21371@vader.DHCP.thefacebook.com \
--to=osandov@osandov.com \
--cc=axboe@kernel.dk \
--cc=bauerman@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--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