Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753819AbbEHRvj (ORCPT ); Fri, 8 May 2015 13:51:39 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:50051 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753670AbbEHRvf (ORCPT ); Fri, 8 May 2015 13:51:35 -0400 From: Shaohua Li To: CC: , , , Subject: [PATCH 4/6 v2] blk-mq: avoid re-initialize request which is failed in direct dispatch Date: Fri, 8 May 2015 10:51:31 -0700 Message-ID: <0163ed9e412b45474df5031e4787880ca4477cc1.1431106907.git.shli@fb.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <726972cd3a12680e1b2ac819f989c0f65c77c1b4.1431106907.git.shli@fb.com> References: <726972cd3a12680e1b2ac819f989c0f65c77c1b4.1431106907.git.shli@fb.com> X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-05-08_07:2015-05-08,2015-05-08,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 916 Lines: 31 If we directly issue a request and it fails, we use blk_mq_merge_queue_io(). But we already assigned bio to a request in blk_mq_bio_to_request. blk_mq_merge_queue_io shouldn't run blk_mq_bio_to_request again. Signed-off-by: Shaohua Li --- block/blk-mq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index a65acff..f13d0de 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1284,6 +1284,8 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio) blk_mq_end_request(rq, rq->errors); goto done; } + blk_mq_insert_request(rq, false, true, true); + return; } } -- 1.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/