From 34aa654ecb8eaef729c2bf51f7f97edab12fc3a6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 30 Oct 2014 14:47:22 +0100 Subject: [PATCH] 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 Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- Reading git-format-patch failed