On Wed, Jul 20, 2022 at 11:33:24PM +0800, Ming Lei wrote:
I meant that request queue is supposed to be low level stuff for implementing
disk function, and request queue hasn't to be released and re-allocated
after each disk whole lifetime(alloc disk, add disk, del_gendisk, release disk).
It doesn't have to. But it is pretty damn convenient if we can.
What we can't easily do is to re-add a disk after del_gendisk was
called but before the final reference went away, which is what ublk
does do currently. In other words it does not even follow the SCSI
model, which works but is somewhat cumbersome, but comes up with
yet another weird model that is probably going to fall apart pretty
quickly when doing STAT_DEV, STOP_DEV loops.