Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions block/blk-mq-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static int blk_mq_do_dispatch_ctx(struct blk_mq_hw_ctx *hctx)

static int __blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
{
bool need_dispatch = false;
bool piecemeal_dispatch = false;
LIST_HEAD(rq_list);

/*
Expand Down Expand Up @@ -298,16 +298,16 @@ static int __blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
blk_mq_sched_mark_restart_hctx(hctx);
if (!blk_mq_dispatch_rq_list(hctx, &rq_list, true))
return 0;
need_dispatch = true;
piecemeal_dispatch = true;
} else {
need_dispatch = hctx->dispatch_busy;
piecemeal_dispatch = hctx->dispatch_busy;
}

if (hctx->queue->elevator)
return blk_mq_do_dispatch_sched(hctx);

/* dequeue request one by one from sw queue if queue is busy */
if (need_dispatch)
if (piecemeal_dispatch)
return blk_mq_do_dispatch_ctx(hctx);
blk_mq_flush_busy_ctxs(hctx, &rq_list);
blk_mq_dispatch_rq_list(hctx, &rq_list, true);
Expand Down
Loading