- To: "Nicholas A. Bellinger" <nab@xxxxxxxxxxxxxxx>
- Subject: Re: [PATCH 6/6] virtio-scsi: Set shost->max_id=1 for tcm_vhost WWPNs
- From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
- Date: Wed, 04 Jul 2012 16:50:56 +0200
- Cc: target-devel <target-devel@xxxxxxxxxxxxxxx>, linux-scsi <linux-scsi@xxxxxxxxxxxxxxx>, lf-virt <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, kvm-devel <kvm@xxxxxxxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxxxxxxxxxx>, Zhi Yong Wu <wuzhy@xxxxxxxxxx>, Anthony Liguori <aliguori@xxxxxxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Hannes Reinecke <hare@xxxxxxx>
- In-reply-to: <1341375846-27882-7-git-send-email-nab@linux-iscsi.org>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0
Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto:
> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
>
> This is currently required for connecting to tcm_vhost in order to prevent
> the client LUN scan from detecting the same tcm_vhost WWPN on multiple target
> IDs.
But that's what the config field is for... why can't tcm_vhost (or QEMU)
set max_id to 0?
Paolo
> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> Cc: Stefan Hajnoczi <stefanha@xxxxxxxxxxxxxxxxxx>
> Cc: Zhi Yong Wu <wuzhy@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxx>
> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> ---
> drivers/scsi/virtio_scsi.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 391b30d..8711951 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -475,7 +475,10 @@ static int __devinit virtscsi_probe(struct virtio_device *vdev)
> shost->cmd_per_lun = min_t(u32, cmd_per_lun, shost->can_queue);
> shost->max_sectors = virtscsi_config_get(vdev, max_sectors) ?: 0xFFFF;
> shost->max_lun = virtscsi_config_get(vdev, max_lun) + 1;
> - shost->max_id = virtscsi_config_get(vdev, max_target) + 1;
> + /*
> + * Currently required for tcm_vhost to function..
> + */
> + shost->max_id = 1;
> shost->max_channel = 0;
> shost->max_cmd_len = VIRTIO_SCSI_CDB_SIZE;
> err = scsi_add_host(shost, &vdev->dev);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI Target Devel]
[Linux SCSI Target Infrastructure]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photos]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Linux IIO]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]