• Omar Sandoval's avatar
    block: clear ctx pending bit under ctx lock · e9a99a63
    Omar Sandoval authored
    When we insert a request, we set the software queue pending bit while
    holding the software queue lock. However, we clear it outside of the
    lock, so it's possible that a concurrent insert could reset the bit
    after we clear it but before we empty the request list. Afterwards, the
    bit would still be set but the software queue wouldn't have any requests
    in it, leading us to do a spurious run in the future. This is mostly a
    benign/theoretical issue, but it makes the following change easier to
    justify.
    Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    e9a99a63
blk-mq.c 78.1 KB