]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning
authorBart Van Assche <bvanassche@acm.org>
Thu, 30 Oct 2014 13:47:22 +0000 (14:47 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:32:02 +0000 (11:32 +0100)
commit192f6f6f6587787a2989be43ed172ed3c0dd9003
treee12947ea6bd1ab840ca866308ab9eadfb7463c11
parent00a37c84df6e7cf465a5e26b4b7c8b4a01f1d449
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>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srp/ib_srp.h