]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] iscsi_tcp: consider session state in iscsi_sw_sk_state_check
authorChris Leech <cleech@redhat.com>
Thu, 26 Sep 2013 16:09:44 +0000 (09:09 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 08:58:13 +0000 (09:58 +0100)
commitec68aafca5aade5390c68d34636d56468f1fdbc7
treeb3500cdee70ee7f4cc90de99301a948cd731b2ca
parent419a98b8044d374440e61c2b812bc6927a8b38a4
[SCSI] iscsi_tcp: consider session state in iscsi_sw_sk_state_check

It seems some iSCSI targets (including the Linux kernel target) close
the TCP connection from the target side immediately after processing a
session logout.

When a TCP FIN comes in right after the iSCSI logout response,
iscsi_sw_sk_state_check sees the local socket as not yet being in
CLOSE_WAIT or CLOSE and logs an error.  But the initiator would close
the connection right after processing the logout response anyway, and
the error is confusing to admins who just requested that the session be
shut down.

This adds a check of the session state, and suppresses the error if we
are in the process of logging out.

Signed-off-by: Chris Leech <cleech@redhat.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/iscsi_tcp.c