• Tejun Heo's avatar
    block: make get_request[_wait]() fail if queue is dead · da8303c6
    Tejun Heo authored
    Currently get_request[_wait]() allocates request whether queue is dead
    or not.  This patch makes get_request[_wait]() return NULL if @q is
    dead.  blk_queue_bio() is updated to fail the submitted bio if request
    allocation fails.  While at it, add docbook comments for
    get_request[_wait]().
    
    Note that the current code has rather unclear (there are spurious DEAD
    tests scattered around) assumption that the owner of a queue
    guarantees that no request travels block layer if the queue is dead
    and this patch in itself doesn't change much; however, this will allow
    fixing the broken assumption in the next patch.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    da8303c6
blk-core.c 74.9 KB