From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org
Cc: Ross Brattain <ross.b.brattain@intel.com>, Yi Zou <yi.zou@intel.com>
Subject: [PATCH 7/8] libfc: do not immediately retry the cmd when seq_send fails in fc_fcp_send_data
Date: Mon, 16 May 2011 16:45:57 -0700 [thread overview]
Message-ID: <20110516234557.24502.54586.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110516234519.24502.22027.stgit@localhost6.localdomain6>
From: Yi Zou <yi.zou@intel.com>
Currently, when seq_send() fails in fc_fcp_send_data(), fc_fcp_retry_cmd()
would complete this failed I/O directly and let scsi-ml retry. However, target side
is not notified which may hang the target. Instead, we should just bail out from
from fc_fcp_send_data and let scsi-ml times it out and aborts this I/O instead.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
drivers/scsi/libfc/fc_fcp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 57704e8..9cd2149 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -681,8 +681,7 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq,
error = lport->tt.seq_send(lport, seq, fp);
if (error) {
WARN_ON(1); /* send error should be rare */
- fc_fcp_retry_cmd(fsp);
- return 0;
+ return error;
}
fp = NULL;
}
next prev parent reply other threads:[~2011-05-16 23:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 23:45 [PATCH 0/8] libfc, libfcoe and fcoe patches for 2.6.40 Robert Love
2011-05-16 23:45 ` [PATCH 1/8] libfcoe: Incorrect CVL handling for NPIV ports Robert Love
2011-05-16 23:45 ` [PATCH 2/8] fcoe: Prevent creation of an NPIV port with duplicate WWPN Robert Love
2011-05-16 23:45 ` [PATCH 3/8] libfc: fix mm leak in handling incoming request for target discovery Robert Love
2011-05-16 23:45 ` [PATCH 4/8] libfc: release DDP context if frame_send() fails Robert Love
2011-05-16 23:45 ` [PATCH 5/8] libfc: don't call resp handler after FC_EX_TIMEOUT Robert Love
2011-05-16 23:45 ` [PATCH 6/8] libfc: fix race in SRR response Robert Love
2011-05-16 23:45 ` Robert Love [this message]
2011-05-16 23:46 ` [PATCH 8/8] libfcoe: Remove unnecessary module state checks Robert Love
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=20110516234557.24502.54586.stgit@localhost6.localdomain6 \
--to=robert.w.love@intel.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ross.b.brattain@intel.com \
--cc=yi.zou@intel.com \
/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).