diff options
author | Bart Van Assche <bvanassche@acm.org> | 2014-10-30 13:47:22 (GMT) |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 10:32:02 (GMT) |
commit | 34aa654ecb8eaef729c2bf51f7f97edab12fc3a6 (patch) | |
tree | e12947ea6bd1ab840ca866308ab9eadfb7463c11 /drivers/infiniband/ulp/srp/ib_srp.h | |
parent | 205619f2f82434aebc5eb21c97fe22eb7b393293 (diff) | |
download | linux-34aa654ecb8eaef729c2bf51f7f97edab12fc3a6.tar.xz |
IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning
If a cable is pulled during LUN scanning it can happen that the
SRP rport and the SCSI host have been created but no LUNs have been
added to the SCSI host. Since multipathd only sends SCSI commands
to a SCSI target if one or more SCSI devices are present and since
there is no keepalive mechanism for IB queue pairs this means that
after a LUN scan failed and after a reconnect has succeeded no
data will be sent over the QP and hence that a subsequent cable
pull will not be detected. Avoid this by not creating an rport or
SCSI host if a cable is pulled during a SCSI LUN scan.
Note: so far the above behavior has only been observed with the
kernel module parameter ch_count set to a value >= 2.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index e46ecb1..00c7c48 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -73,6 +73,7 @@ enum { }; enum srp_target_state { + SRP_TARGET_SCANNING, SRP_TARGET_LIVE, SRP_TARGET_REMOVED, }; |