From: Vaughan Cao <vaughan.cao@oracle.com>
To: michaelc@cs.wisc.edu
Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, vaughan.cao@oracle.com
Subject: [PATCH] iscsi: quiesce connection error event during logout
Date: Thu, 21 Nov 2013 17:19:07 +0800 [thread overview]
Message-ID: <1385025547-1693-1-git-send-email-vaughan.cao@oracle.com> (raw)
'connectionX:X: detected conn error(1020)' message appear during normal
logout phase because of connection close on target peer.
Quiesce it to avoid confusion.
Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
---
drivers/scsi/libiscsi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index e399561..0e127d1 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1356,6 +1356,12 @@ void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
spin_unlock_bh(&session->lock);
return;
}
+ /* Target closed the connection in response to logout */
+ if (session->state == ISCSI_STATE_LOGGING_OUT &&
+ err == ISCSI_ERR_TCP_CONN_CLOSE) {
+ spin_unlock_bh(&session->lock);
+ return;
+ }
if (conn->stop_stage == 0)
session->state = ISCSI_STATE_FAILED;
--
1.8.3.1
reply other threads:[~2013-11-21 9:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385025547-1693-1-git-send-email-vaughan.cao@oracle.com \
--to=vaughan.cao@oracle.com \
--cc=JBottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).