[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170413133909.GC13387@stefanha-x1.localdomain>
Date: Thu, 13 Apr 2017 14:39:09 +0100
From: Stefan Hajnoczi <stefanha@...hat.com>
To: David Gibson <david@...son.dropbear.id.au>
Cc: pbonzini@...hat.com, famz@...hat.com, jejb@...ux.vnet.ibm.com,
martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virtio_scsi: Always try to read VPD pages
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.
Download attachment "signature.asc" of type "application/pgp-signature" (456 bytes)
Powered by blists - more mailing lists