Commit 4985e7b
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: 71f28f3 ("ublk_drv: add io_uring based userspace block driver")
Reviewed-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230318141231.55562-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 8f0d196 commit 4985e7b
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1602 | 1602 | | |
1603 | 1603 | | |
1604 | 1604 | | |
| 1605 | + | |
1605 | 1606 | | |
1606 | 1607 | | |
1607 | 1608 | | |
1608 | 1609 | | |
1609 | 1610 | | |
1610 | 1611 | | |
| 1612 | + | |
1611 | 1613 | | |
1612 | 1614 | | |
1613 | 1615 | | |
1614 | 1616 | | |
1615 | | - | |
1616 | 1617 | | |
1617 | 1618 | | |
1618 | 1619 | | |
| |||
0 commit comments