• Kemeng Shi's avatar
    blk-mq: Fix potential io hung for shared sbitmap per tagset · 47df9ce9
    Kemeng Shi authored
    Commit f906a6a0 ("blk-mq: improve tag waiting setup for non-shared
    tags") mark restart for unshared tags for improvement. At that time,
    tags is only shared betweens queues and we can check if tags is shared
    by test BLK_MQ_F_TAG_SHARED.
    Afterwards, commit 32bc15af ("blk-mq: Facilitate a shared sbitmap per
    tagset") enabled tags share betweens hctxs inside a queue. We only
    mark restart for shared hctxs inside a queue and may cause io hung if
    there is no tag currently allocated by hctxs going to be marked restart.
    Wait on sbitmap_queue instead of mark restart for shared hctxs case to
    fix this.
    
    Fixes: 32bc15af ("blk-mq: Facilitate a shared sbitmap per tagset")
    Signed-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    47df9ce9
blk-mq.c 123 KB