From: Mike Christie <michaelc@cs.wisc.edu>
To: Sagi Grimberg <sagig@mellanox.com>,
jbottomley@parallels.com, hch@infradead.org
Cc: linux-scsi@vger.kernel.org, ogerlitz@mellanox.com
Subject: Re: [PATCH RESEND] libiscsi: Don't retry if xmit_task return a non-transient error code
Date: Wed, 27 Aug 2014 13:44:59 -0500 [thread overview]
Message-ID: <53FE272B.4000803@cs.wisc.edu> (raw)
In-Reply-To: <1408289020-31847-1-git-send-email-sagig@mellanox.com>
On 08/17/2014 10:23 AM, Sagi Grimberg wrote:
> Allow transport callback xmit_task to return a non-transient
> error code -EINVAL to inform us not to retry the task. For any
> other error code keep the current retry behavior.
>
> Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
> ---
> drivers/scsi/libiscsi.c | 13 ++++++++++---
> 1 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 3d1bc67..03768a9 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -1722,10 +1722,17 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
> goto prepd_fault;
> }
> }
> - if (session->tt->xmit_task(task)) {
> +
> + reason = session->tt->xmit_task(task);
> + if (reason) {
> session->cmdsn--;
> - reason = FAILURE_SESSION_NOT_READY;
> - goto prepd_reject;
> + if (reason == -EINVAL) {
> + sc->result = DID_ABORT << 16;
> + goto prepd_fault;
> + } else {
> + reason = FAILURE_SESSION_NOT_READY;
> + goto prepd_reject;
> + }
> }
> } else {
> list_add_tail(&task->running, &conn->cmdqueue);
>
Looks ok to me.
Acked-by: Mike Christie <michaelc@cs.wisc.edu>
prev parent reply other threads:[~2014-08-27 18:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-17 15:23 [PATCH RESEND] libiscsi: Don't retry if xmit_task return a non-transient error code Sagi Grimberg
2014-08-27 18:44 ` Mike Christie [this message]
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=53FE272B.4000803@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=hch@infradead.org \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=sagig@mellanox.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