What if there is multiple concurrent allocation(reserve) requests?It is just lucky for connection request because IO isn't startedIt's not lucky, we reserve a per-queue tag for exactly this flow (connect)
yet at that time, and the allocation always succeeds in the 1st try of
__blk_mq_get_tag().
so we
always have one available. And when the connect is running, the driver
should
guarantee nothing else is running.
You still
may run into allocation from other hw queue. In reality, nvme may don't
use in that way, but as one API, it is still not good, or at least the
behavior should be documented.