On Nov 02, 2021 / 23:36, Ming Lei wrote: > In case of shared tags and none io sched, batched completion still may > be run into, and hctx->nr_active is accounted when getting driver tag, > so it has to be updated in blk_mq_end_request_batch(). > > Otherwise, hctx->nr_active may become same with queue depth, then > hctx_may_queue() always return false, then io hang is caused. > > Fixes the issue by updating the counter in batched way. > > Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> > Fixes: f794f3351f26 ("block: add support for blk_mq_end_request_batch()") > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> Ming, thank you very much. I have confirmed that the blktests block/005 hang disappears using NVMe devices with two namespaces. Though this patch is already queued up to for-5.16/block, in case it is still meaningful: Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> -- Best Regards, Shin'ichiro Kawasaki