From: "Ewan D. Milne" <emilne@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Paolo Bonzini <pbonzini@redhat.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] scsi: disable VPD page check on error
Date: Mon, 13 Jun 2016 09:50:33 -0400 [thread overview]
Message-ID: <1465825834.4088.8.camel@localhost.localdomain> (raw)
In-Reply-To: <1465822133-22143-1-git-send-email-hare@suse.de>
On Mon, 2016-06-13 at 14:48 +0200, Hannes Reinecke wrote:
> If we encounter an error during VPD page scanning we should be
> setting the 'skip_vpd_pages' bit to avoid further accesses.
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
> drivers/scsi/scsi.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
> index 1deb6ad..0359864 100644
> --- a/drivers/scsi/scsi.c
> +++ b/drivers/scsi/scsi.c
> @@ -796,6 +796,7 @@ retry_pg0:
> result = scsi_vpd_inquiry(sdev, vpd_buf, 0, vpd_len);
> if (result < 0) {
> kfree(vpd_buf);
> + sdev->skip_vpd_pages = 1;
> return;
> }
> if (result > vpd_len) {
> @@ -822,6 +823,7 @@ retry_pg80:
> result = scsi_vpd_inquiry(sdev, vpd_buf, 0x80, vpd_len);
> if (result < 0) {
> kfree(vpd_buf);
> + sdev->skip_vpd_pages = 1;
> return;
> }
> if (result > vpd_len) {
> @@ -851,6 +853,7 @@ retry_pg83:
> result = scsi_vpd_inquiry(sdev, vpd_buf, 0x83, vpd_len);
> if (result < 0) {
> kfree(vpd_buf);
> + sdev->skip_vpd_pages = 1;
> return;
> }
> if (result > vpd_len) {
So, this changes scsi_attach_vpd() but not scsi_get_vpd_page() ?
This particular implementation worries me. If we get an error
performing a VPD inquiry, we will never, ever, attempt one again? What
happens if a path is down at the time? The idea behind getting updated
VPD info was that it might change, so if that does happen we don't want
to stop updating after an isolated error.
I think what we want to do is check if the VPD inquiry is supported on
the *initial* inquiry, and if that fails then suppress further updates.
-Ewan
next prev parent reply other threads:[~2016-06-13 13:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 12:48 [PATCH] scsi: disable VPD page check on error Hannes Reinecke
2016-06-13 13:50 ` Ewan D. Milne [this message]
2016-06-13 13:56 ` Hannes Reinecke
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=1465825834.4088.8.camel@localhost.localdomain \
--to=emilne@redhat.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=pbonzini@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.