linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* lpfc fixes for 2.6.39
@ 2011-02-25 20:04 michaelc
  2011-02-25 20:04 ` [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning michaelc
  2011-02-25 20:04 ` [PATCH 2/2] lpfc: block target when port queueing limit is hit michaelc
  0 siblings, 2 replies; 5+ messages in thread
From: michaelc @ 2011-02-25 20:04 UTC (permalink / raw)
  To: linux-scsi; +Cc: james.smart

The following 2 patches were made over scsi-misc. They fix
one bug where the retries on a command could get used during
the port transition race. And they fix a issue where
we were blocking the entire host when just one port affected
by a overqueueing problem.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning
  2011-02-25 20:04 lpfc fixes for 2.6.39 michaelc
@ 2011-02-25 20:04 ` michaelc
  2011-02-26  0:07   ` James Smart
  2011-02-25 20:04 ` [PATCH 2/2] lpfc: block target when port queueing limit is hit michaelc
  1 sibling, 1 reply; 5+ messages in thread
From: michaelc @ 2011-02-25 20:04 UTC (permalink / raw)
  To: linux-scsi; +Cc: james.smart, Mike Christie

From: Mike Christie <michaelc@cs.wisc.edu>

If the port takes a while to transition we could exhaust
the retries when using DID_TRANSPORT_DISRUPTED. For this
case we do not want to use any of the cmd's
retries, because if the command was running then when
it got failed the retry counter was already incremented.
And if this is the first time we are seeing the command,
(it got queued because it slipped through during the race)
then it should not have its retries incremented. The
fc class will decide the correct handling later.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 drivers/scsi/lpfc/lpfc_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index c97751c..af5aaaa 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3004,7 +3004,7 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
 	 * transport is still transitioning.
 	 */
 	if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
-		cmnd->result = ScsiResult(DID_TRANSPORT_DISRUPTED, 0);
+		cmnd->result = ScsiResult(DID_IMM_RETRY, 0);
 		goto out_fail_command;
 	}
 	if (atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth)
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] lpfc: block target when port queueing limit is hit
  2011-02-25 20:04 lpfc fixes for 2.6.39 michaelc
  2011-02-25 20:04 ` [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning michaelc
@ 2011-02-25 20:04 ` michaelc
  2011-02-26  0:07   ` James Smart
  1 sibling, 1 reply; 5+ messages in thread
From: michaelc @ 2011-02-25 20:04 UTC (permalink / raw)
  To: linux-scsi; +Cc: james.smart, Mike Christie

From: Mike Christie <michaelc@cs.wisc.edu>

Instead of blocking the entire host when the port's
queueing limit is hit, we should only block the port's
target. This will allow IO to other ports to execute.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 drivers/scsi/lpfc/lpfc_scsi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index af5aaaa..63a81a4 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3008,7 +3008,7 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
 		goto out_fail_command;
 	}
 	if (atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth)
-		goto out_host_busy;
+		goto out_tgt_busy;
 
 	lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp);
 	if (lpfc_cmd == NULL) {
@@ -3125,6 +3125,9 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
  out_host_busy:
 	return SCSI_MLQUEUE_HOST_BUSY;
 
+ out_tgt_busy:
+	return SCSI_MLQUEUE_TARGET_BUSY;
+
  out_fail_command:
 	done(cmnd);
 	return 0;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning
  2011-02-25 20:04 ` [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning michaelc
@ 2011-02-26  0:07   ` James Smart
  0 siblings, 0 replies; 5+ messages in thread
From: James Smart @ 2011-02-26  0:07 UTC (permalink / raw)
  To: michaelc@cs.wisc.edu; +Cc: linux-scsi@vger.kernel.org

Acked-by: James Smart  <james.smart@emulex.com>

-- james s


On 2/25/2011 3:04 PM, michaelc@cs.wisc.edu wrote:
> From: Mike Christie<michaelc@cs.wisc.edu>
>
> If the port takes a while to transition we could exhaust
> the retries when using DID_TRANSPORT_DISRUPTED. For this
> case we do not want to use any of the cmd's
> retries, because if the command was running then when
> it got failed the retry counter was already incremented.
> And if this is the first time we are seeing the command,
> (it got queued because it slipped through during the race)
> then it should not have its retries incremented. The
> fc class will decide the correct handling later.
>
> Signed-off-by: Mike Christie<michaelc@cs.wisc.edu>
> ---
>   drivers/scsi/lpfc/lpfc_scsi.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index c97751c..af5aaaa 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -3004,7 +3004,7 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
>   	 * transport is still transitioning.
>   	 */
>   	if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
> -		cmnd->result = ScsiResult(DID_TRANSPORT_DISRUPTED, 0);
> +		cmnd->result = ScsiResult(DID_IMM_RETRY, 0);
>   		goto out_fail_command;
>   	}
>   	if (atomic_read(&ndlp->cmd_pending)>= ndlp->cmd_qdepth)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] lpfc: block target when port queueing limit is hit
  2011-02-25 20:04 ` [PATCH 2/2] lpfc: block target when port queueing limit is hit michaelc
@ 2011-02-26  0:07   ` James Smart
  0 siblings, 0 replies; 5+ messages in thread
From: James Smart @ 2011-02-26  0:07 UTC (permalink / raw)
  To: michaelc@cs.wisc.edu; +Cc: linux-scsi@vger.kernel.org

Acked-by: James Smart  <james.smart@emulex.com>

-- james s



On 2/25/2011 3:04 PM, michaelc@cs.wisc.edu wrote:
> From: Mike Christie<michaelc@cs.wisc.edu>
>
> Instead of blocking the entire host when the port's
> queueing limit is hit, we should only block the port's
> target. This will allow IO to other ports to execute.
>
> Signed-off-by: Mike Christie<michaelc@cs.wisc.edu>
> ---
>   drivers/scsi/lpfc/lpfc_scsi.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index af5aaaa..63a81a4 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -3008,7 +3008,7 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
>   		goto out_fail_command;
>   	}
>   	if (atomic_read(&ndlp->cmd_pending)>= ndlp->cmd_qdepth)
> -		goto out_host_busy;
> +		goto out_tgt_busy;
>
>   	lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp);
>   	if (lpfc_cmd == NULL) {
> @@ -3125,6 +3125,9 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
>    out_host_busy:
>   	return SCSI_MLQUEUE_HOST_BUSY;
>
> + out_tgt_busy:
> +	return SCSI_MLQUEUE_TARGET_BUSY;
> +
>    out_fail_command:
>   	done(cmnd);
>   	return 0;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-26  0:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 20:04 lpfc fixes for 2.6.39 michaelc
2011-02-25 20:04 ` [PATCH 1/2] lpfc: force retry in queuecommand when port is transitioning michaelc
2011-02-26  0:07   ` James Smart
2011-02-25 20:04 ` [PATCH 2/2] lpfc: block target when port queueing limit is hit michaelc
2011-02-26  0:07   ` James Smart

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).