[PATCH v2 12/15] IB/srp: Fail SCSI commands silently

Bart Van Assche
2013-06-28T12:56:52Z

From: Sebastian Riemer <sebastian.riemer@profitbricks.com>

Avoid that path failover in a multipath setup causes the SCSI layer
to generate kernel messages about SCSI command failures. This patch
speeds up SRP initiator operation significantly when monitoring
kernel messages over a serial port.

[bvanassche: Changed patch description]
Signed-off-by: Sebastian Riemer <sebastian.riemer@profitbricks.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Roland Dreier <roland@purestorage.com>
Cc: David Dillow <dillowda@ornl.gov>
Cc: Vu Pham <vu@mellanox.com>
---
drivers/infiniband/ulp/srp/ib_srp.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index a8cc427..e77176e 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -757,6 +757,7 @@ static void srp_finish_req(struct srp_target_port *target,

if (scmnd) {
srp_free_req(target, req, scmnd, 0);
+ scmnd->request->cmd_flags |= REQ_QUIET;
scmnd->result = result;
scmnd->scsi_done(scmnd);
}
@@ -1438,6 +1439,7 @@ static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd)

result = srp_chkready(target->rport);
if (unlikely(result)) {
+ scmnd->request->cmd_flags |= REQ_QUIET;
scmnd->result = result;
scmnd->scsi_done(scmnd);
return 0;
@@ -1843,6 +1845,7 @@ static int srp_abort(struct scsi_cmnd *scmnd)
else
ret = FAILED;
srp_free_req(target, req, scmnd, 0);
+ scmnd->request->cmd_flags |= REQ_QUIET;
scmnd->result = DID_ABORT << 16;
scmnd->scsi_done(scmnd);

--
1.7.10.4