Re: [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-10-11 Thread Christoph Hellwig
On Wed, Oct 05, 2016 at 02:51:50PM -0700, Bart Van Assche wrote: > There are multiple direct blk_*() calls in other SCSI transport drivers. So > my proposal is to wait with moving this code into scsi_lib.c until there is > a second user of this code. I still don't think these low-level differenc

Re: [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-10-05 Thread Bart Van Assche
On 10/05/2016 10:38 AM, Sagi Grimberg wrote: +static void srp_mq_wait_for_queuecommand(struct Scsi_Host *shost) +{ +struct scsi_device *sdev; +struct request_queue *q; + +shost_for_each_device(sdev, shost) { +q = sdev->request_queue; + +blk_mq_quiesce_queue(q); +

Re: [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-10-05 Thread Sagi Grimberg
+static void srp_mq_wait_for_queuecommand(struct Scsi_Host *shost) +{ + struct scsi_device *sdev; + struct request_queue *q; + + shost_for_each_device(sdev, shost) { + q = sdev->request_queue; + + blk_mq_quiesce_queue(q); + blk_mq_resum

Re: [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-09-28 Thread Hannes Reinecke
On 09/29/2016 02:01 AM, Bart Van Assche wrote: > Ensure that if scsi-mq is enabled that srp_wait_for_queuecommand() > waits until ongoing shost->hostt->queuecommand() calls have finished. > > Signed-off-by: Bart Van Assche > Cc: James Bottomley > Cc: Martin K. Petersen > Cc: Doug Ledford > ---

[PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-09-28 Thread Bart Van Assche
Ensure that if scsi-mq is enabled that srp_wait_for_queuecommand() waits until ongoing shost->hostt->queuecommand() calls have finished. Signed-off-by: Bart Van Assche Cc: James Bottomley Cc: Martin K. Petersen Cc: Doug Ledford --- drivers/scsi/scsi_transport_srp.c | 24 --