Skip to content

Commit

Permalink
blk-mq: add REQ_SYNC early
Browse files Browse the repository at this point in the history
Add REQ_SYNC early, so rq_dispatched[] in blk_mq_rq_ctx_init
is set correctly.

Signed-off-by: Shaohua Li<[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Shaohua Li authored and axboe committed Mar 21, 2014
1 parent 55c816e commit 27fbf4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
ctx = blk_mq_get_ctx(q);
hctx = q->mq_ops->map_queue(q, ctx->cpu);

if (is_sync)
rw |= REQ_SYNC;
trace_block_getrq(q, bio, rw);
rq = __blk_mq_alloc_request(hctx, GFP_ATOMIC, false);
if (likely(rq))
Expand Down

0 comments on commit 27fbf4e

Please sign in to comment.