diff options
author | Shaohua Li <shli@kernel.org> | 2014-02-19 07:20:21 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-03-21 10:57:58 -0400 |
commit | 27fbf4e87c16bb3e40730890169a643a494b7c64 (patch) | |
tree | ad40dba46ae1e5c5844115676ed4b2634c6e12b6 /block/blk-mq.c | |
parent | 55c816e3df86cfebf7c8cdd44892800aaaa8fce0 (diff) |
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>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 3c2804879a90..b1bcc619d0ea 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -860,6 +860,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio) | |||
860 | ctx = blk_mq_get_ctx(q); | 860 | ctx = blk_mq_get_ctx(q); |
861 | hctx = q->mq_ops->map_queue(q, ctx->cpu); | 861 | hctx = q->mq_ops->map_queue(q, ctx->cpu); |
862 | 862 | ||
863 | if (is_sync) | ||
864 | rw |= REQ_SYNC; | ||
863 | trace_block_getrq(q, bio, rw); | 865 | trace_block_getrq(q, bio, rw); |
864 | rq = __blk_mq_alloc_request(hctx, GFP_ATOMIC, false); | 866 | rq = __blk_mq_alloc_request(hctx, GFP_ATOMIC, false); |
865 | if (likely(rq)) | 867 | if (likely(rq)) |