diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-02-28 12:33:02 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-02-28 12:34:58 -0800 |
commit | c91c4d94ef7abc2644cdc0885bd5fc903f002ece (patch) | |
tree | d8f07a9a1258060a0ea6d89801e967bdd7ad6549 | |
parent | c2a1281665db803951962719e3c0515bf27763cb (diff) | |
download | qemu-kvm-vhost-scsi-for-1.3-abi-v1.tar.gz |
vhost-scsi: Drop tpgt usage for multi-target, bump ABI_VERSION=1vhost-scsi-for-1.3-abi-v1
In order to function with v3.9-rc1 tcm_vhost code supporting
multi-target operation, go ahead and drop the legacy tpgt values
in vhost-scsi, as well as bump ABI_VERSION=1.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | hw/vhost-scsi.c | 15 | ||||
-rw-r--r-- | hw/vhost-scsi.h | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/hw/vhost-scsi.c b/hw/vhost-scsi.c index 96da2fc779f..ae28438cf2f 100644 --- a/hw/vhost-scsi.c +++ b/hw/vhost-scsi.c @@ -24,7 +24,6 @@ struct VHostSCSI { const char *id; const char *wwpn; - uint16_t tpgt; int vhostfd; struct vhost_dev dev; struct vhost_virtqueue vqs[VHOST_SCSI_VQ_NUM]; @@ -92,7 +91,6 @@ int vhost_scsi_start(VHostSCSI *vs, VirtIODevice *vdev) memset(&backend, 0, sizeof(backend)); pstrcpy(backend.vhost_wwpn, sizeof(backend.vhost_wwpn), vs->wwpn); - backend.vhost_tpgt = vs->tpgt; ret = ioctl(vs->dev.control, VHOST_SCSI_SET_ENDPOINT, &backend); if (ret < 0) { ret = -errno; @@ -110,7 +108,6 @@ void vhost_scsi_stop(VHostSCSI *vs, VirtIODevice *vdev) memset(&backend, 0, sizeof(backend)); pstrcpy(backend.vhost_wwpn, sizeof(backend.vhost_wwpn), vs->wwpn); - backend.vhost_tpgt = vs->tpgt; ret = ioctl(vs->dev.control, VHOST_SCSI_CLEAR_ENDPOINT, &backend); if (ret < 0) { error_report("vhost-scsi: Failed to clear endpoint\n"); @@ -120,7 +117,7 @@ void vhost_scsi_stop(VHostSCSI *vs, VirtIODevice *vdev) } static VHostSCSI *vhost_scsi_add(const char *id, const char *wwpn, - uint16_t tpgt, const char *vhostfd_str) + const char *vhostfd_str) { VHostSCSI *vs; int ret; @@ -151,7 +148,6 @@ static VHostSCSI *vhost_scsi_add(const char *id, const char *wwpn, vs->id = g_strdup(id); vs->wwpn = g_strdup(wwpn); - vs->tpgt = tpgt; QLIST_INSERT_HEAD(&vhost_scsi_list, vs, list); return vs; @@ -161,7 +157,6 @@ VHostSCSI *vhost_scsi_add_opts(QemuOpts *opts) { const char *id; const char *wwpn, *vhostfd; - uint64_t tpgt; id = qemu_opts_id(opts); if (!id) { @@ -178,13 +173,7 @@ VHostSCSI *vhost_scsi_add_opts(QemuOpts *opts) error_report("vhost-scsi: \"%s\" missing wwpn\n", id); return NULL; } - - tpgt = qemu_opt_get_number(opts, "tpgt", UINT64_MAX); - if (tpgt > UINT16_MAX) { - error_report("vhost-scsi: \"%s\" needs a 16-bit tpgt\n", id); - return NULL; - } vhostfd = qemu_opt_get(opts, "vhostfd"); - return vhost_scsi_add(id, wwpn, tpgt, vhostfd); + return vhost_scsi_add(id, wwpn, vhostfd); } diff --git a/hw/vhost-scsi.h b/hw/vhost-scsi.h index 68de51ab07a..08d6abc93bf 100644 --- a/hw/vhost-scsi.h +++ b/hw/vhost-scsi.h @@ -25,7 +25,7 @@ * RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl usage */ -#define VHOST_SCSI_ABI_VERSION 0 +#define VHOST_SCSI_ABI_VERSION 1 /* TODO #include <linux/vhost.h> properly */ /* For VHOST_SCSI_SET_ENDPOINT/VHOST_SCSI_CLEAR_ENDPOINT ioctl */ |