From: Hannes Reinecke <hare@suse.de>
To: Rob Evers <revers@redhat.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] alua: clarify messages when blk_execute_rq fails
Date: Fri, 07 Oct 2011 08:12:15 +0200 [thread overview]
Message-ID: <4E8E983F.10804@suse.de> (raw)
In-Reply-To: <4E8E269F.4020901@redhat.com>
On 10/07/2011 12:07 AM, Rob Evers wrote:
> On 08/12/2011 05:01 PM, Rob Evers wrote:
>> replace numeric messages with string error messages when
>> blk_execute_rq
>> fails. Also add printing of sense info.
>>
>> Mike Christie suggested adding printing of sense info here
>>
>> Signed-off-by: Rob Evers<revers@redhat.com>
>> ---
>> drivers/scsi/device_handler/scsi_dh_alua.c | 27
>> ++++++++++++++++++---------
>> 1 files changed, 18 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
>> b/drivers/scsi/device_handler/scsi_dh_alua.c
>> index 6fec9fe..58fdf64 100644
>> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
>> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
>> @@ -24,6 +24,7 @@
>> #include<scsi/scsi.h>
>> #include<scsi/scsi_eh.h>
>> #include<scsi/scsi_dh.h>
>> +#include<scsi/scsi_dbg.h>
>>
>> #define ALUA_DH_NAME "alua"
>> #define ALUA_DH_VER "1.3"
>> @@ -153,9 +154,12 @@ static int submit_std_inquiry(struct
>> scsi_device *sdev, struct alua_dh_data *h)
>>
>> err = blk_execute_rq(rq->q, NULL, rq, 1);
>> if (err == -EIO) {
>> - sdev_printk(KERN_INFO, sdev,
>> - "%s: std inquiry failed with %x\n",
>> - ALUA_DH_NAME, rq->errors);
>> + sdev_printk(KERN_INFO, sdev, "%s: std inquiry failed\n",
>> + ALUA_DH_NAME);
>> + scsi_show_result(rq->errors);
>> + if (driver_byte(rq->errors)&& DRIVER_SENSE)
>> + __scsi_print_sense("alua std_inquiry", rq->sense,
>> + rq->sense_len);
>> h->senselen = rq->sense_len;
>> err = SCSI_DH_IO;
>> }
>> @@ -190,9 +194,12 @@ static int submit_vpd_inquiry(struct
>> scsi_device *sdev, struct alua_dh_data *h)
>>
>> err = blk_execute_rq(rq->q, NULL, rq, 1);
>> if (err == -EIO) {
>> - sdev_printk(KERN_INFO, sdev,
>> - "%s: evpd inquiry failed with %x\n",
>> - ALUA_DH_NAME, rq->errors);
>> + sdev_printk(KERN_INFO, sdev, "%s: evpd inquiry failed\n",
>> + ALUA_DH_NAME);
>> + scsi_show_result(rq->errors);
>> + if (driver_byte(rq->errors)&& DRIVER_SENSE)
>> + __scsi_print_sense("alua vpd_inquiry", rq->sense,
>> + rq->sense_len);
>> h->senselen = rq->sense_len;
>> err = SCSI_DH_IO;
>> }
>> @@ -229,9 +236,11 @@ static unsigned submit_rtpg(struct
>> scsi_device *sdev, struct alua_dh_data *h)
>>
>> err = blk_execute_rq(rq->q, NULL, rq, 1);
>> if (err == -EIO) {
>> - sdev_printk(KERN_INFO, sdev,
>> - "%s: rtpg failed with %x\n",
>> - ALUA_DH_NAME, rq->errors);
>> + sdev_printk(KERN_INFO, sdev, "%s: rtpg failed\n", ALUA_DH_NAME);
>> + scsi_show_result(rq->errors);
>> + if (driver_byte(rq->errors)&& DRIVER_SENSE)
>> + __scsi_print_sense("alua submit_rtpg", rq->sense,
>> + rq->sense_len);
>> h->senselen = rq->sense_len;
>> err = SCSI_DH_IO;
>> }
>
> Hannes,
>
> Did you get a chance to take a look at this patch?
>
Yes, I did.
And found it's actually not quite correct; we'll need to evaluate
the sense code here to do a possible retry.
I'll be updating the patch.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
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
prev parent reply other threads:[~2011-10-07 6:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 21:01 [PATCH 1/2] alua: clarify messages when blk_execute_rq fails Rob Evers
2011-08-12 21:01 ` [PATCH 2/2] scsi_io_completion: remove confusing unhandled messages Rob Evers
2011-08-30 20:07 ` [PATCH 1/2] alua: clarify messages when blk_execute_rq fails Rob Evers
2011-08-30 21:37 ` James Bottomley
2011-08-31 1:12 ` Rob Evers
2011-09-02 20:21 ` Rob Evers
2011-10-06 22:07 ` Rob Evers
2011-10-07 6:12 ` Hannes Reinecke [this message]
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=4E8E983F.10804@suse.de \
--to=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=revers@redhat.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.