From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:47060 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932903AbdADN3k (ORCPT ); Wed, 4 Jan 2017 08:29:40 -0500 Subject: Patch "blk-mq: Do not invoke .queue_rq() for a stopped queue" has been added to the 4.9-stable tree To: bart.vanassche@sandisk.com, axboe@fb.com, gregkh@linuxfoundation.org, hare@suse.com, hch@lst.de, jthumshirn@suse.de, sagi@grimberg.me, tom.leiming@gmail.com Cc: , From: Date: Wed, 04 Jan 2017 14:29:44 +0100 Message-ID: <148353658416883@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled blk-mq: Do not invoke .queue_rq() for a stopped queue to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: blk-mq-do-not-invoke-.queue_rq-for-a-stopped-queue.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From bc27c01b5c46d3bfec42c96537c7a3fae0bb2cc4 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 28 Oct 2016 17:18:48 -0700 Subject: blk-mq: Do not invoke .queue_rq() for a stopped queue From: Bart Van Assche commit bc27c01b5c46d3bfec42c96537c7a3fae0bb2cc4 upstream. The meaning of the BLK_MQ_S_STOPPED flag is "do not call .queue_rq()". Hence modify blk_mq_make_request() such that requests are queued instead of issued if a queue has been stopped. Reported-by: Ming Lei Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1332,9 +1332,9 @@ static blk_qc_t blk_mq_make_request(stru blk_mq_put_ctx(data.ctx); if (!old_rq) goto done; - if (!blk_mq_direct_issue_request(old_rq, &cookie)) - goto done; - blk_mq_insert_request(old_rq, false, true, true); + if (test_bit(BLK_MQ_S_STOPPED, &data.hctx->state) || + blk_mq_direct_issue_request(old_rq, &cookie) != 0) + blk_mq_insert_request(old_rq, false, true, true); goto done; } Patches currently in stable-queue which might be from bart.vanassche@sandisk.com are queue-4.9/dm-rq-fix-a-race-condition-in-rq_completed.patch queue-4.9/blk-mq-do-not-invoke-.queue_rq-for-a-stopped-queue.patch queue-4.9/dm-table-fix-all_blk_mq-inconsistency-when-an-empty-table-is-loaded.patch queue-4.9/dm-table-an-all_blk_mq-table-must-be-loaded-for-a-blk-mq-dm-device.patch