From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Bart Van Assche To: Jens Axboe CC: , "Martin K . Petersen" , James Bottomley , Bart Van Assche , Christoph Hellwig Subject: [PATCH v2 5/5] scsi: Ensure that scsi_run_queue() runs all hardware queues Date: Mon, 3 Apr 2017 16:22:28 -0700 Message-ID: <20170403232228.11208-6-bart.vanassche@sandisk.com> In-Reply-To: <20170403232228.11208-1-bart.vanassche@sandisk.com> References: <20170403232228.11208-1-bart.vanassche@sandisk.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Bart.VanAssche@sandisk.com List-ID: commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues") removed the blk_mq_stop_hw_queue() call from scsi_queue_rq() for the BLK_MQ_RQ_QUEUE_BUSY case. blk_mq_start_stopped_hw_queues() only runs queues that had been stopped. Hence change the blk_mq_start_stopped_hw_queues() call in scsi_run_queue() into blk_mq_run_hw_queues(). Remove the blk_mq_start_stopped_hw_queues() call from scsi_end_request() because __blk_mq_finish_request() already runs all hardware queues if needed. Fixes: commit 52d7f1b5c2f3 ("blk-mq: Avoid that requeueing starts stopped queues") Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Cc: Martin K. Petersen Cc: James Bottomley Cc: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 0e240aebc150..4459b18f62a1 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -496,7 +496,7 @@ static void scsi_run_queue(struct request_queue *q) scsi_starved_list_run(sdev->host); if (q->mq_ops) - blk_mq_start_stopped_hw_queues(q, false); + blk_mq_run_hw_queues(q, false); else blk_run_queue(q); } @@ -681,8 +681,6 @@ static bool scsi_end_request(struct request *req, int error, if (scsi_target(sdev)->single_lun || !list_empty(&sdev->host->starved_list)) kblockd_schedule_work(&sdev->requeue_work); - else - blk_mq_start_stopped_hw_queues(q, true); } else { unsigned long flags; -- 2.12.0