1
0
Fork 0

blk-mq: add REQ_SYNC early

Add REQ_SYNC early, so rq_dispatched[] in blk_mq_rq_ctx_init
is set correctly.

Signed-off-by: Shaohua Li<shli@fusionio.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
hifive-unleashed-5.1
Shaohua Li 2014-02-19 20:20:21 +08:00 committed by Jens Axboe
parent 2a26ebef84
commit 739c3eea71
1 changed files with 2 additions and 0 deletions

View File

@ -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))