Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1623020

Re: [PATCH] virtio_scsi: Always try to read VPD pages

From Stefan Hajnoczi <stefanha@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] virtio_scsi: Always try to read VPD pages
Date 2017-04-13 15:40 +0200
Message-ID <tvN8B-3CF-13@gated-at.bofh.it> (permalink)
References <tvCGd-4M2-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] virtio_scsi: Always try to read VPD pages David Gibson <david@gibson.dropbear.id.au> - 2017-04-13 04:30 +0200
  Re: [PATCH] virtio_scsi: Always try to read VPD pages Stefan Hajnoczi <stefanha@redhat.com> - 2017-04-13 15:40 +0200
    Re: [PATCH] virtio_scsi: Always try to read VPD pages Paolo Bonzini <pbonzini@redhat.com> - 2017-04-19 17:10 +0200
  Re: [PATCH] virtio_scsi: Always try to read VPD pages "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-04-20 01:20 +0200

csiph-web