From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Dan Williams <dan.j.williams@intel.com>,
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
Laurent Dufour <ldufour@linux.vnet.ibm.com>,
Jan Kara <jack@suse.cz>
Subject: [PATCH 0/5 v3] BDI lifetime fix
Date: Thu, 2 Feb 2017 15:56:48 +0100 [thread overview]
Message-ID: <20170202145653.19614-1-jack@suse.cz> (raw)
Hello,
this is the third version of the patch series that 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. I gave some basic testing to the patches in
KVM and on a real machine, Dan was running them with libnvdimm test suite which
was previously triggering the oops and things look good. So patches should be
reasonably healthy.
Changes since v2:
* Added Reviewed-by tags
* Removed slab cache for backing_dev_info
* Added patch to remove blkdev_get_backing_dev_info()
Changes since v1:
* Use kref instead of atomic_t for refcount
* Get rid of free_on_put flag
Honza
next reply other threads:[~2017-02-02 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 14:56 Jan Kara [this message]
2017-02-02 14:56 ` [PATCH 1/5] block: Unhash block device inodes on gendisk destruction Jan Kara
2017-02-02 14:56 ` [PATCH 2/5] block: Use pointer to backing_dev_info from request_queue Jan Kara
2017-02-02 14:56 ` [PATCH 3/5] block: Dynamically allocate and refcount backing_dev_info Jan Kara
2017-02-02 14:56 ` [PATCH 4/5] block: Make blk_get_backing_dev_info() safe without open bdev Jan Kara
2017-02-02 14:56 ` [PATCH 5/5] block: Get rid of blk_get_backing_dev_info() Jan Kara
2017-02-02 15:22 ` [PATCH 0/5 v3] BDI lifetime fix Jens Axboe
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=20170202145653.19614-1-jack@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