]> git.baikalelectronics.ru Git - kernel.git/commit
block: support delayed holder registration
authorChristoph Hellwig <hch@lst.de>
Wed, 4 Aug 2021 09:41:43 +0000 (11:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Aug 2021 17:50:42 +0000 (11:50 -0600)
commite2b06c0b7c9ff8f6a77a2d2634345f4e4055aed8
tree44449bb3fd601e4fbd630928ce20284e76469e3e
parentb32ba156ff26a609f707d5dbe9b91898d752b095
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>
Link: https://lore.kernel.org/r/20210804094147.459763-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
block/holder.c
include/linux/genhd.h