From 63ba8e31c3ac6393b07c6e18538814a730478766 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Sat, 14 Oct 2017 17:22:28 +0800 Subject: block: kyber: check if there are requests in ctx in kyber_has_work() 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 Signed-off-by: Jens Axboe --- block/kyber-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block') diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c index db5bfc6342d34..b4df317c29169 100644 --- a/block/kyber-iosched.c +++ b/block/kyber-iosched.c @@ -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) \ -- cgit v1.2.3