Linux block layer
 help / color / mirror / Atom feed
* [PATCH 0/5 v3] BDI lifetime fix
@ 2017-02-02 14:56 Jan Kara
  2017-02-02 14:56 ` [PATCH 1/5] block: Unhash block device inodes on gendisk destruction Jan Kara
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jan Kara @ 2017-02-02 14:56 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Christoph Hellwig, Dan Williams,
	Thiago Jung Bauermann, Laurent Dufour, Jan Kara

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-02 15:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-02 14:56 [PATCH 0/5 v3] BDI lifetime fix Jan Kara
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox