All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_dh_rdac: always retry MODE SELECT on command lock violation
Date: Fri, 22 Jan 2016 15:48:18 +0100	[thread overview]
Message-ID: <20160122144818.GA5963@c203.arch.suse.de> (raw)
In-Reply-To: <1453473761-54777-1-git-send-email-hare@suse.de>

On Fri, Jan 22, 2016 at 03:42:41PM +0100, Hannes Reinecke wrote:
> If MODE SELECT returns with sense '05/91/36' (command lock violation)
> it should always be retried without counting the number of retries.
> During an HBA upgrade or similar circumstances one might see a flood
> of MODE SELECT command from various HBAs, which will easily trigger
> the sense code and exceed the retry count.
> 
> References: bsc#956949

Without the bugzilla refrence

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/scsi/device_handler/scsi_dh_rdac.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
> index 3613581..93880ed 100644
> --- a/drivers/scsi/device_handler/scsi_dh_rdac.c
> +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
> @@ -562,7 +562,7 @@ static int mode_select_handle_sense(struct scsi_device *sdev,
>  			/*
>  			 * Command Lock contention
>  			 */
> -			err = SCSI_DH_RETRY;
> +			err = SCSI_DH_IMM_RETRY;
>  		break;
>  	default:
>  		break;
> @@ -612,6 +612,8 @@ retry:
>  		err = mode_select_handle_sense(sdev, h->sense);
>  		if (err == SCSI_DH_RETRY && retry_cnt--)
>  			goto retry;
> +		if (err == SCSI_DH_IMM_RETRY)
> +			goto retry;
>  	}
>  	if (err == SCSI_DH_OK) {
>  		h->state = RDAC_STATE_ACTIVE;
> -- 
> 1.8.5.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-01-22 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 14:42 [PATCH] scsi_dh_rdac: always retry MODE SELECT on command lock violation Hannes Reinecke
2016-01-22 14:48 ` Johannes Thumshirn [this message]
2016-02-04  2:48 ` Martin K. Petersen
2016-02-04  7:01   ` Hannes Reinecke
2016-02-05  3:28 ` Martin K. Petersen

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=20160122144818.GA5963@c203.arch.suse.de \
    --to=jthumshirn@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.