diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2016-11-23 01:17:50 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-12-20 23:01:28 +0100 |
commit | 7dbbf0fa1bf14c17900bb8057986b06db3822239 (patch) | |
tree | 95caa3b38a4ab3f291ec587cf7dc8d8616764d9f /drivers/scsi | |
parent | scsi: avoid a permanent stop of the scsi device's request queue (diff) | |
download | linux-7dbbf0fa1bf14c17900bb8057986b06db3822239.tar.xz linux-7dbbf0fa1bf14c17900bb8057986b06db3822239.zip |
scsi: scsi-mq: Wait for .queue_rq() if necessary
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c35b6de4ca64..9fd9a977c695 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -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); |