From: Brian King <brking@linux.vnet.ibm.com>
To: Christoph Hellwig <hch@infradead.org>, wenxiong@linux.vnet.ibm.com
Cc: device-mapper development <dm-devel@redhat.com>,
James Bottomley <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org
Subject: Re: [dm-devel] [PATCH 1/1] multipath-tools: Change path checker for IBM IPR devices
Date: Mon, 06 Oct 2014 10:22:13 -0500 [thread overview]
Message-ID: <5432B3A5.4080001@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141001125134.GB31067@infradead.org>
On 10/01/2014 07:51 AM, Christoph Hellwig wrote:
> Unfortunately the patch wasn't quite correct - all TEST_UNIT_READY
> commands are sent as BLOCK_PC, so this would basically revert James'
> original fix for the SATL case.
>
> Am I right to assume you only need the call to scsi_dh->check_sense and
> not the rest of the handling for the multipath path checker? If that's
> the case something like the patch below sould work:
This would work if we also duplicated the 02/04/02 K/C/Q check in alua_check_sense
handler.
Wendy - can you try my patch below, along with Christoph's latest patch here
and see if that resolves the issue?
Thanks,
Brian
>
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 5db8454..399c1c8 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -459,14 +459,6 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
> if (! scsi_command_normalize_sense(scmd, &sshdr))
> return FAILED; /* no valid sense data */
>
> - if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done)
> - /*
> - * nasty: for mid-layer issued TURs, we need to return the
> - * actual sense data without any recovery attempt. For eh
> - * issued ones, we need to try to recover and interpret
> - */
> - return SUCCESS;
> -
> scsi_report_sense(sdev, &sshdr);
>
> if (scsi_sense_is_deferred(&sshdr))
> @@ -482,6 +474,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
> /* handler does not care. Drop down to default handling */
> }
>
> + if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done)
> + /*
> + * nasty: for mid-layer issued TURs, we need to return the
> + * actual sense data without any recovery attempt. For eh
> + * issued ones, we need to try to recover and interpret
> + */
> + return SUCCESS;
> +
> /*
> * Previous logic looked for FILEMARK, EOM or ILI which are
> * mainly associated with tapes and returned SUCCESS.
>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 7 +++++++
1 file changed, 7 insertions(+)
diff -puN drivers/scsi/device_handler/scsi_dh_alua.c~alua_allow_restart drivers/scsi/device_handler/scsi_dh_alua.c
--- linux/drivers/scsi/device_handler/scsi_dh_alua.c~alua_allow_restart 2014-10-06 10:19:16.184798305 -0500
+++ linux-bjking1/drivers/scsi/device_handler/scsi_dh_alua.c 2014-10-06 10:20:35.743165951 -0500
@@ -474,6 +474,13 @@ static int alua_check_sense(struct scsi_
* LUN Not Ready -- Offline
*/
return SUCCESS;
+ if (sdev->allow_restart &&
+ (sense_hdr->asc == 0x04) && (sense_hdr->ascq == 0x02))
+ /*
+ * if the device is not started, we need to wake
+ * the error handler to start the motor
+ */
+ return FAILED;
break;
case UNIT_ATTENTION:
if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
_
next prev parent reply other threads:[~2014-10-06 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 19:57 [PATCH 0/1] Change path checker for IPR devices wenxiong
2014-09-24 19:57 ` [PATCH 1/1] multipath-tools: Change path checker for IBM " wenxiong
2014-09-25 6:29 ` Hannes Reinecke
2014-09-25 16:47 ` Brian King
2014-09-25 16:57 ` [dm-devel] " Christoph Hellwig
2014-09-30 18:05 ` wenxiong
2014-10-01 12:51 ` Christoph Hellwig
2014-10-06 15:22 ` Brian King [this message]
2014-10-06 21:50 ` wenxiong
2014-10-21 11:03 ` Christoph Hellwig
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=5432B3A5.4080001@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=JBottomley@parallels.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=wenxiong@linux.vnet.ibm.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.