Hi, While reviewing vhost-user-blk, I realized a lot of code was based on vhost-user-scsi, and I found a number of improvements could be made. As a result in this series, I tried to move common glib code in libvhost-user-glib. (I originally made libvhost-user glib-free, so if external projects want to play with it, they don't have to depend on glib, for ex vhost-user-bridge doesn't use glib).
I haven't done extensive testing, I tried to setup a LUN with help from https://fedoraproject.org/wiki/Scsi-target-utils_Quickstart_Guide, but the guest says "Unexpected response from lun 1 while scanning, scan aborted" (before or after the series). Help welcome! Thanks v2: - patch 3, 25, 26 missing review - drop giochannel patch, use libvhost-user-glib helper instead - misc style changes - comments improvements - fix vus dependency on libvhost-user.a Marc-André Lureau (27): glib-compat: move G_SOURCE_CONTINUE/REMOVE there build-sys: fix libvhost-user.a build build-sys: make vhost-user-scsi depend on libvhost-user.a libvhost-user: drop dependency on glib libvhost-user: improve vu_queue_pop() doc vhost-user-scsi: use g_strdup() vhost-user-scsi: connect unix socket before allocating vhost-user-scsi: code style fixes vhost-user-scsi: use glib allocation vhost-user-scsi: glib calls that allocate don't return NULL vhost-user-scsi: also free the gtree vhost-user-scsi: remove vdev_scsi_find_by_vu() vhost-user-scsi: simplify unix path cleanup vhost-user-scsi: use NULL pointer vhost-user-scsi: assert() in iscsi_add_lun() vhost-user-scsi: remove vdev_scsi_add_iscsi_lun() vhost-user-scsi: remove VUS_MAX_LUNS vhost-user-scsi: remove unimplemented functions vhost-user-scsi: rename VUS types vhost-user-scsi: avoid use of iscsi_ namespace vhost-user-scsi: don't copy iscsi/scsi-lowlevel.h vhost-user-scsi: drop extra callback pointer vhost-user-scsi: simplify source handling vhost-user-scsi: use glib logging libvhost-user: add glib source helper vhost-user-scsi: use libvhost-user glib helper vhost-user-scsi: remove server_sock from VusDev contrib/libvhost-user/libvhost-user-glib.h | 32 ++ contrib/libvhost-user/libvhost-user.h | 3 +- include/glib-compat.h | 7 + contrib/libvhost-user/libvhost-user-glib.c | 154 +++++++ contrib/libvhost-user/libvhost-user.c | 29 +- contrib/vhost-user-scsi/vhost-user-scsi.c | 629 +++++------------------------ Makefile | 5 +- Makefile.objs | 1 - contrib/libvhost-user/Makefile.objs | 2 +- tests/Makefile.include | 2 +- 10 files changed, 316 insertions(+), 548 deletions(-) create mode 100644 contrib/libvhost-user/libvhost-user-glib.h create mode 100644 contrib/libvhost-user/libvhost-user-glib.c -- 2.14.1.146.gd35faa819
