]> git.baikalelectronics.ru Git - kernel.git/commit
ublk: defer disk allocation
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Jul 2022 13:09:16 +0000 (15:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Jul 2022 16:52:12 +0000 (10:52 -0600)
commit8ecffafca3f118e86e5e74876da45bf4d02b3fa4
tree9b5aafdc323ecd350777e133839487fb79dd027d
parent8bea04ec6f79c8465d3fa6057b8b52fcc501628d
ublk: defer disk allocation

Defer allocating the gendisk and request_queue until UBLK_CMD_START_DEV
is called.  This avoids funky life times where a disk is allocated
and then can be added and removed multiple times, which has never been
supported by the block layer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220721130916.1869719-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c