Skip to content
Commit 4985e7b2 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

block: ublk_drv: mark device as LIVE before adding disk

IO can be started before add_disk() returns, such as reading parititon table,
then the monitor work should work for making forward progress.

So mark device as LIVE before adding disk, meantime change to
DEAD if add_disk() fails.

Fixed: 71f28f31

 ("ublk_drv: add io_uring based userspace block driver")
Reviewed-by: default avatarZiyang Zhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230318141231.55562-1-ming.lei@redhat.com
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8f0d196e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment