]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
block: kyber: check if there are requests in ctx in kyber_has_work()
authorMing Lei <ming.lei@redhat.com>
Sat, 14 Oct 2017 09:22:28 +0000 (17:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Nov 2017 14:20:02 +0000 (08:20 -0600)
There may be request in sw queue, and not fetched to domain queue
yet, so check it in kyber_has_work().

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/kyber-iosched.c

index db5bfc6342d342f53d4ec2f6b26b9cc743fb75ef..b4df317c291692f01138b91608dc6c80f71bb9aa 100644 (file)
@@ -649,7 +649,7 @@ static bool kyber_has_work(struct blk_mq_hw_ctx *hctx)
                if (!list_empty_careful(&khd->rqs[i]))
                        return true;
        }
-       return false;
+       return sbitmap_any_bit_set(&hctx->ctx_map);
 }
 
 #define KYBER_LAT_SHOW_STORE(op)                                       \