From: Stefan Hajnoczi <stefanha@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: pbonzini@redhat.com, famz@redhat.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virtio_scsi: Always try to read VPD pages
Date: Thu, 13 Apr 2017 14:39:09 +0100 [thread overview]
Message-ID: <20170413133909.GC13387@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170413021300.25023-1-david@gibson.dropbear.id.au>
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
On Thu, Apr 13, 2017 at 12:13:00PM +1000, David Gibson wrote:
> @@ -705,6 +706,28 @@ static int virtscsi_device_reset(struct scsi_cmnd *sc)
> return virtscsi_tmf(vscsi, cmd);
> }
>
> +static int virtscsi_device_alloc(struct scsi_device *sdevice)
> +{
> + /*
> + * Passed through SCSI targets (e.g. with qemu's 'scsi-block')
> + * may have transfer limits which come from the host SCSI
> + * controller something on the host side other than the target
s/controller something/controller or something/ ?
> + * itself.
> + *
> + * To make this work properly, the hypervisor can adjust the
> + * target's VPD information to advertise these limits. But
> + * for that to work, the guest has to look at the VPD pages,
> + * which we won't do by default if it is an SPC-2 device, even
> + * if it does actually support it.
> + *
> + * So, set the blist to always try to read the VPD pages.
> + */
> + sdevice->sdev_bflags = BLIST_TRY_VPD_PAGES;
> +
> + return 0;
> +}
Looks good to me. Not a SCSI expert but I checked
scsi_device_supports_vpd() callers and this seems sane.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-04-13 13:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 2:13 [PATCH] virtio_scsi: Always try to read VPD pages David Gibson
2017-04-13 13:39 ` Stefan Hajnoczi [this message]
2017-04-19 14:57 ` Paolo Bonzini
2017-04-19 23:12 ` 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=20170413133909.GC13387@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=famz@redhat.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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 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).