]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
scsi: scsi-mq: Wait for .queue_rq() if necessary
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 23 Nov 2016 00:17:50 +0000 (16:17 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Dec 2016 22:01:28 +0000 (17:01 -0500)
Ensure that if scsi-mq is enabled that scsi_internal_device_block()
waits until ongoing shost->hostt->queuecommand() calls have finished.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: James Bottomley <jejb@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Doug Ledford <dledford@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c

index c35b6de4ca643297d1908341421c865c2cb93e84..9fd9a977c695e002b594073caf4c2d79327e59b9 100644 (file)
@@ -2893,7 +2893,7 @@ scsi_internal_device_block(struct scsi_device *sdev)
         * request queue. 
         */
        if (q->mq_ops) {
-               blk_mq_stop_hw_queues(q);
+               blk_mq_quiesce_queue(q);
        } else {
                spin_lock_irqsave(q->queue_lock, flags);
                blk_stop_queue(q);