Patchwork [03/16] virtio-scsi: Add vhost_vring_target ioctl struct

login
register
mail settings
Submitter Zhiyong Wu
Date April 19, 2012, 2:38 a.m.
Message ID <1334803149-27379-4-git-send-email-zwu.kernel@gmail.com>
Download mbox | patch
Permalink /patch/153632/
State New
Headers show

Comments

Zhiyong Wu - April 19, 2012, 2:38 a.m.
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

The vhost-scsi device is associated with a tcm_vhost target using the
VHOST_SCSI_SET_ENDPOINT and VHOST_SCSI_CLEAR_ENDPOINT ioctls that take a
wwpn and tpgt.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/virtio-scsi.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/virtio-scsi.h b/hw/virtio-scsi.h
index 895f620..9cddacb 100644
--- a/hw/virtio-scsi.h
+++ b/hw/virtio-scsi.h
@@ -33,6 +33,12 @@  struct VirtIOSCSIConf {
     DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \
     DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
 
+/* For VHOST_SCSI_SET_ENDPOINT/VHOST_SCSI_CLEAR_ENDPOINT ioctl */
+struct vhost_vring_target {
+    unsigned char vhost_wwpn[224];
+    unsigned short vhost_tpgt;
+};
+
 typedef struct {
     /* The tcm_vhost wwpn and tgpt */
     char *wwpn;