All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4 v2] BDI lifetime fix
@ 2017-01-31 12:54 Jan Kara
  2017-01-31 12:54 ` [PATCH 1/4] block: Unhash block device inodes on gendisk destruction Jan Kara
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Jan Kara @ 2017-01-31 12:54 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Christoph Hellwig, Dan Williams,
	Thiago Jung Bauermann, Laurent Dufour, Jan Kara

Hello,

this is a second 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 they should
be reasonably healthy. Laurent, if you can give these patches testing in your
environment where you were triggering the oops, it would be nice.

								Honza

^ permalink raw reply	[flat|nested] 23+ messages in thread
* [PATCH 0/4 RFC] BDI lifetime fix
@ 2017-01-26 17:45 Jan Kara
  2017-01-26 17:45 ` [PATCH 2/4] block: Use pointer to backing_dev_info from request_queue Jan Kara
  0 siblings, 1 reply; 23+ messages in thread
From: Jan Kara @ 2017-01-26 17:45 UTC (permalink / raw)
  To: linux-block
  Cc: Christoph Hellwig, Jens Axboe, Dan Williams,
	Thiago Jung Bauermann, Laurent Dufour, Jan Kara

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.

I'd also appreciate if people had a look whether the approach I took looks
sensible.

								Honza

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

end of thread, other threads:[~2017-02-08 16:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 12:54 [PATCH 0/4 v2] BDI lifetime fix Jan Kara
2017-01-31 12:54 ` [PATCH 1/4] block: Unhash block device inodes on gendisk destruction Jan Kara
2017-02-01  9:48   ` Christoph Hellwig
2017-01-31 12:54 ` [PATCH 2/4] block: Use pointer to backing_dev_info from request_queue Jan Kara
2017-02-01  9:48   ` Christoph Hellwig
2017-01-31 12:54 ` [PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info Jan Kara
2017-02-01  9:50   ` Christoph Hellwig
2017-02-01 12:22     ` Jan Kara
2017-02-01 22:45       ` Jens Axboe
2017-02-02 13:32         ` Jan Kara
2017-01-31 12:54 ` [PATCH 4/4] block: Make blk_get_backing_dev_info() safe without open bdev Jan Kara
2017-02-01  9:53   ` Christoph Hellwig
2017-02-01 12:28     ` Jan Kara
2017-02-01 12:52       ` Christoph Hellwig
2017-02-01 19:25   ` Dan Williams
2017-02-06 14:48 ` [PATCH 0/4 v2] BDI lifetime fix Thiago Jung Bauermann
2017-02-06 15:26   ` Thiago Jung Bauermann
2017-02-07 12:33     ` Jan Kara
2017-02-07 17:21       ` Tejun Heo
2017-02-08  7:51         ` Jan Kara
2017-02-08 10:23           ` Jan Kara
2017-02-08 16:00             ` Dan Williams
  -- strict thread matches above, loose matches on Subject: below --
2017-01-26 17:45 [PATCH 0/4 RFC] " Jan Kara
2017-01-26 17:45 ` [PATCH 2/4] block: Use pointer to backing_dev_info from request_queue Jan Kara

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.