]> 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)
commitb0775f6467e81de486c7f4bd9ce2cf0c9e0a22b9
tree44449bb3fd601e4fbd630928ce20284e76469e3e
parentad1413d18506a96f865308f5c7be1d6818ac3612
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