summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srp/ib_srp.h
diff options
context:
space:
mode:
authorBart Van Assche2014-10-30 14:47:22 +0100
committerChristoph Hellwig2014-11-12 11:32:02 +0100
commit34aa654ecb8eaef729c2bf51f7f97edab12fc3a6 (patch)
treee12947ea6bd1ab840ca866308ab9eadfb7463c11 /drivers/infiniband/ulp/srp/ib_srp.h
parentIB/srp: Remove stale connection retry mechanism (diff)
downloadkernel-qcow2-linux-34aa654ecb8eaef729c2bf51f7f97edab12fc3a6.tar.gz
kernel-qcow2-linux-34aa654ecb8eaef729c2bf51f7f97edab12fc3a6.tar.xz
kernel-qcow2-linux-34aa654ecb8eaef729c2bf51f7f97edab12fc3a6.zip
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.h1
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 e46ecb15aa0d..00c7c480f680 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,
};