]> www.infradead.org Git - users/hch/block.git/commit
block: support delayed holder registration
authorChristoph Hellwig <hch@lst.de>
Sat, 24 Jul 2021 09:14:42 +0000 (11:14 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 4 Aug 2021 08:09:56 +0000 (10:09 +0200)
commita60ffb9d036a6b43a3458def57c6f95eb7af56d6
treef34702ca0ee60064367d15b14668efd129001a6e
parentd7d597dac116fc4172bcbef540579272cd6048f0
block: support delayed holder registration

device mapper needs to register holders before it is ready to do I/O.
Currently it does so by registering the disk early, which can leave
the disk and queue in a weird half state where the queue is registered
with the disk, except for sysfs and the elevator.  And this state has
been a bit promlematic before, and will get more so when sorting out
the responsibilities between the queue and the disk.

Support registering holders on an initialized but not registered disk
instead by delaying the sysfs registration until the disk is registered.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
block/genhd.c
block/holder.c
include/linux/genhd.h