• Ming Lei's avatar
    blk-mq: always allow reserved allocation in hctx_may_queue · 28500850
    Ming Lei authored
    NVMe shares tagset between fabric queue and admin queue or between
    connect_q and NS queue, so hctx_may_queue() can be called to allocate
    request for these queues.
    
    Tags can be reserved in these tagset. Before error recovery, there is
    often lots of in-flight requests which can't be completed, and new
    reserved request may be needed in error recovery path. However,
    hctx_may_queue() can always return false because there is too many
    in-flight requests which can't be completed during error handling.
    Finally, nothing can proceed.
    
    Fix this issue by always allowing reserved tag allocation in
    hctx_may_queue(). This is reasonable because reserved tags are supposed
    to always be available.
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
    Cc: David Milburn <dmilburn@redhat.com>
    Cc: Ewan D. Milne <emilne@redhat.com>
    Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    28500850
blk-mq-tag.c 17.1 KB