Skip to content
  • Shaohua Li's avatar
    blk-mq: Don't reserve a tag for flush request · f0276924
    Shaohua Li authored
    
    
    Reserving a tag (request) for flush to avoid dead lock is a overkill. A
    tag is valuable resource. We can track the number of flush requests and
    disallow having too many pending flush requests allocated. With this
    patch, blk_mq_alloc_request_pinned() could do a busy nop (but not a dead
    loop) if too many pending requests are allocated and new flush request
    is allocated. But this should not be a problem, too many pending flush
    requests are very rare case.
    
    I verified this can fix the deadlock caused by too many pending flush
    requests.
    
    Signed-off-by: default avatarShaohua Li <shli@fusionio.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    f0276924