From: Jack Wang <jinpu.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
To: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
Cc: David Dillow <dillowda-1Heg1YXhbW8@public.gmane.org>,
Vu Pham <vu-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Sebastian Riemer
<sebastian.riemer-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 2/3] IB/srp: Avoid offlining operational SCSI devices
Date: Thu, 10 Oct 2013 14:31:22 +0200 [thread overview]
Message-ID: <52569E1A.4010004@profitbricks.com> (raw)
In-Reply-To: <52569501.5030108-HInyCGIudOg@public.gmane.org>
On 10/10/2013 01:52 PM, Bart Van Assche wrote:
> If SCSI commands are submitted with a SCSI request timeout that is
> lower than the the IB RC timeout it can happen that the SCSI error
> handler has already started device recovery before transport layer
> error handling starts. So it can happen that the SCSI error handler
> tries to abort a SCSI command after it has been reset by
> srp_rport_reconnect(). Tell the SCSI error handler that such commands
> have finished and that it is not necessary to continue its recovery
> strategy for commands that have been reset by srp_rport_reconnect().
Another possible is srp has already finish the req (req is NULL)when
scsi error handle call into srp_abort.
I tested it on my side, works for me.
You can add my Tested-by if needed.
Thanks Bart.
Jack
>
> Signed-off-by: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
> Cc: David Dillow <dillowda-1Heg1YXhbW8@public.gmane.org>
> Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Vu Pham <vuhuong-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Sebastian Riemer <sebastian.riemer-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> Cc: Jack Wang <jinpu.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
> ---
> drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
> index f1318a8..93a35a1 100644
> --- a/drivers/infiniband/ulp/srp/ib_srp.c
> +++ b/drivers/infiniband/ulp/srp/ib_srp.c
> @@ -1752,7 +1752,7 @@ static int srp_abort(struct scsi_cmnd *scmnd)
> shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n");
>
> if (!req || !srp_claim_req(target, req, scmnd))
> - return FAILED;
> + return SUCCESS;
> if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun,
> SRP_TSK_ABORT_TASK) == 0)
> ret = SUCCESS;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-10-10 12:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 11:48 [PATCH 0/3] IB/srp patches for the stable tree Bart Van Assche
[not found] ` <5256941A.3040506-HInyCGIudOg@public.gmane.org>
2013-10-10 11:50 ` [PATCH 1/3] IB/srp: Remove target from list before freeing Scsi_Host structure Bart Van Assche
[not found] ` <52569485.8050708-HInyCGIudOg@public.gmane.org>
2013-10-10 12:45 ` Jack Wang
[not found] ` <5256A183.3030404-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-10-10 12:48 ` Bart Van Assche
[not found] ` <5256A230.9020007-HInyCGIudOg@public.gmane.org>
2013-10-10 13:42 ` Jack Wang
2013-10-10 11:52 ` [PATCH 2/3] IB/srp: Avoid offlining operational SCSI devices Bart Van Assche
[not found] ` <52569501.5030108-HInyCGIudOg@public.gmane.org>
2013-10-10 12:31 ` Jack Wang [this message]
2013-10-10 11:53 ` [PATCH 3/3] IB/srp: Report receive errors correctly Bart Van Assche
2013-10-25 22:16 ` [PATCH 0/3] IB/srp patches for the stable tree David Dillow
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=52569E1A.4010004@profitbricks.com \
--to=jinpu.wang-eikl63zcoxah+58jc4qpia@public.gmane.org \
--cc=bvanassche-HInyCGIudOg@public.gmane.org \
--cc=dillowda-1Heg1YXhbW8@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sebastian.riemer-EIkl63zCoXaH+58JC4qpiA@public.gmane.org \
--cc=vu-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/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).