From: James Smart <james.smart@emulex.com>
To: Sarang Radke <sarang.radke@qlogic.com>
Cc: "fujita.tomonori@lab.ntt.co.jp" <fujita.tomonori@lab.ntt.co.jp>,
"James.Bottomley@suse.de" <James.Bottomley@suse.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Andrew Vasquez <andrew.vasquez@qlogic.com>,
Lalit Chandivade <lalit.chandivade@qlogic.com>,
Giridhar Malavali <giridhar.malavali@qlogic.com>,
Ravi Anand <ravi.anand@qlogic.com>
Subject: Re: [RFC PATCH] scsi_transport_fc: Make sure commands are completed when rport is offline
Date: Wed, 10 Mar 2010 09:50:24 -0500 [thread overview]
Message-ID: <4B97B1B0.1080802@emulex.com> (raw)
In-Reply-To: <1FB7DC5E34DADB499463B6EA89DF40A4638369F9EB@MNEXMB1.qlogic.org>
Acked-by: James Smart <james.smart@emulex.com>
-- james s
Sarang Radke wrote:
> James S./Fujita,
>
> Thanks for the comments. The description of scenario was the one with which I noted the issue. But yes, the same would be true for any rport which is offline.
>
> I am resending the patch with the suggested modifications.
>
> -Thanks,
> Sarang
>
>>From 84a1f847c71382f67f97ea956b2283cf6d737340 Mon Sep 17 00:00:00 2001
> From: Sarang Radke <sarang.radke@qlogic.com>
> Date: Tue, 9 Mar 2010 12:20:29 -0500
> Subject: [PATCH] Make sure commands are completed for offline rport
>
> blk_end_request doesn't complete a bidi request
> successfully
>
> The unfinished request eventually triggers a panic in
> timeout handling routine fc_bsg_job_timeout as
> req->special is NULL
>
> Use blk_end_request_all to end the request unconditionally
>
> Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
> ---
> drivers/scsi/scsi_transport_fc.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
> index 79660ee..5819457 100644
> --- a/drivers/scsi/scsi_transport_fc.c
> +++ b/drivers/scsi/scsi_transport_fc.c
> @@ -3852,7 +3852,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
> if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) {
> req->errors = -ENXIO;
> spin_unlock_irq(q->queue_lock);
> - blk_end_request(req, -ENXIO, blk_rq_bytes(req));
> + blk_end_request_all(req, -ENXIO);
> spin_lock_irq(q->queue_lock);
> continue;
> }
> @@ -3862,7 +3862,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
> ret = fc_req_to_bsgjob(shost, rport, req);
> if (ret) {
> req->errors = ret;
> - blk_end_request(req, ret, blk_rq_bytes(req));
> + blk_end_request_all(req, ret);
> spin_lock_irq(q->queue_lock);
> continue;
> }
> --
> 1.5.6
next prev parent reply other threads:[~2010-03-10 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 11:27 [RFC PATCH] scsi_transport_fc: Make sure commands are completed when rport is offline Sarang Radke
2010-03-09 14:41 ` James Smart
2010-03-10 10:03 ` Sarang Radke
2010-03-10 14:50 ` James Smart [this message]
2010-03-11 0:52 ` FUJITA Tomonori
2010-03-10 5:46 ` FUJITA Tomonori
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=4B97B1B0.1080802@emulex.com \
--to=james.smart@emulex.com \
--cc=James.Bottomley@suse.de \
--cc=andrew.vasquez@qlogic.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=giridhar.malavali@qlogic.com \
--cc=lalit.chandivade@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ravi.anand@qlogic.com \
--cc=sarang.radke@qlogic.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