Add REQ_SYNC early, so rq_dispatched[] in blk_mq_rq_ctx_init is set correctly.
Signed-off-by: Shaohua Li<s...@fusionio.com> --- block/blk-mq.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux/block/blk-mq.c =================================================================== --- linux.orig/block/blk-mq.c 2014-02-19 17:10:02.000000000 +0800 +++ linux/block/blk-mq.c 2014-02-19 18:51:25.082774359 +0800 @@ -926,6 +926,8 @@ static void blk_mq_make_request(struct r 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)) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/