From: Sebastian Riemer <[email protected]>

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 <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: David Dillow <[email protected]>
Cc: Vu Pham <[email protected]>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to