[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 17/27] vhost-user-scsi: remove VUS_MAX_LUNS
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PULL v2 17/27] vhost-user-scsi: remove VUS_MAX_LUNS |
Date: |
Tue, 10 Oct 2017 23:34:56 +0200 |
There is no code to support more than 1 yet, no need for that today.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
contrib/vhost-user-scsi/vhost-user-scsi.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/contrib/vhost-user-scsi/vhost-user-scsi.c
b/contrib/vhost-user-scsi/vhost-user-scsi.c
index 38fe451619..6b55cc71d3 100644
--- a/contrib/vhost-user-scsi/vhost-user-scsi.c
+++ b/contrib/vhost-user-scsi/vhost-user-scsi.c
@@ -53,8 +53,6 @@
/** vhost-user-scsi specific definitions **/
- /* Only 1 LUN and device supported today */
-#define VUS_MAX_LUNS 1
#define VUS_ISCSI_INITIATOR "iqn.2016-11.com.nutanix:vhost-user-scsi"
typedef struct iscsi_lun {
@@ -67,7 +65,7 @@ typedef struct vhost_scsi_dev {
int server_sock;
GMainLoop *loop;
GTree *fdmap; /* fd -> gsource context id */
- iscsi_lun_t luns[VUS_MAX_LUNS];
+ iscsi_lun_t lun;
} vhost_scsi_dev_t;
/** glib event loop integration for libvhost-user and misc callbacks **/
@@ -535,7 +533,7 @@ static void vus_proc_req(VuDev *vu_dev, int idx)
}
rsp = (VirtIOSCSICmdResp *)elem->in_sg[0].iov_base;
- if (handle_cmd_sync(vdev_scsi->luns[0].iscsi_ctx,
+ if (handle_cmd_sync(vdev_scsi->lun.iscsi_ctx,
req, &elem->out_sg[1], elem->out_num - 1,
rsp, &elem->in_sg[1], elem->in_num - 1) != 0) {
vus_panic_cb(vu_dev, NULL);
@@ -720,7 +718,7 @@ int main(int argc, char **argv)
}
vdev_scsi = vdev_scsi_new(sock);
- if (iscsi_add_lun(&vdev_scsi->luns[0], iscsi_uri) != 0) {
+ if (iscsi_add_lun(&vdev_scsi->lun, iscsi_uri) != 0) {
goto err;
}
--
2.15.0.rc0.40.gaefcc5f6f
- [Qemu-devel] [PULL v2 07/27] vhost-user-scsi: connect unix socket before allocating, (continued)
- [Qemu-devel] [PULL v2 07/27] vhost-user-scsi: connect unix socket before allocating, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 08/27] vhost-user-scsi: code style fixes, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 09/27] vhost-user-scsi: use glib allocation, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 10/27] vhost-user-scsi: glib calls that allocate don't return NULL, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 11/27] vhost-user-scsi: also free the gtree, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 12/27] vhost-user-scsi: remove vdev_scsi_find_by_vu(), Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 13/27] vhost-user-scsi: simplify unix path cleanup, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 14/27] vhost-user-scsi: use NULL pointer, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 15/27] vhost-user-scsi: assert() in iscsi_add_lun(), Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 16/27] vhost-user-scsi: remove vdev_scsi_add_iscsi_lun(), Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 17/27] vhost-user-scsi: remove VUS_MAX_LUNS,
Marc-André Lureau <=
- [Qemu-devel] [PULL v2 18/27] vhost-user-scsi: remove unimplemented functions, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 19/27] vhost-user-scsi: rename VUS types, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 20/27] vhost-user-scsi: avoid use of iscsi_ namespace, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 21/27] vhost-user-scsi: don't copy iscsi/scsi-lowlevel.h, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 22/27] vhost-user-scsi: drop extra callback pointer, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 23/27] vhost-user-scsi: simplify source handling, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 24/27] vhost-user-scsi: use glib logging, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 25/27] libvhost-user: add glib source helper, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 26/27] vhost-user-scsi: use libvhost-user glib helper, Marc-André Lureau, 2017/10/10
- [Qemu-devel] [PULL v2 27/27] vhost-user-scsi: remove server_sock from VusDev, Marc-André Lureau, 2017/10/10