Skip to contentSkip to conversation

block/vxhs.c Add support for a new block device type called "vxhs"

PATCH Superseded Ashish Mittal 2 participants 6 messages Nov 1, 2016 Block layer

v5 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 block/vxhs.c Add support for a new block device type called "vxhs"

Source code for the qnio library that this code loads can be downloaded from:
https://github.com/MittalAshish/libqnio.git

Sample command line using the JSON syntax:
./qemu-system-x86_64 -name instance-00000008 -S -vnc 0.0.0.0:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on 'json:{"driver":"vxhs","vdisk-id":"c3e9095a-a5ee-4dce-afeb-2a59fb387410", "server":{"host":"172.172.17.4","port":"9999"}}'

Sample command line using the URI syntax:
qemu-img convert -f raw -O raw -n /var/lib/nova/instances/_base/0c5eacd5ebea5ed914b6a3e7b18f1ce734c386ad vxhs://192.168.0.1:9999/c6718f6b-0401-441d-a8c3-1f0064d75ee0

---
v5 changelog:
(1) Incorporated v4 review comments.

v4 changelog:
(1) Incorporated v3 review comments on QAPI changes.
(2) Added refcounting for device open/close. Free library resources on last device close.

v3 changelog:
(1) Added QAPI schema for the VxHS driver.

v2 changelog:
(1) Changes done in response to v1 comments.

TODO:
(1) Add qemu-iotest

 block/Makefile.objs  |   2 +
 block/trace-events   |  21 ++
 block/vxhs.c         | 689 +++++++++++++++++++++++++++++++++++++++++++++++++++
 configure            |  41 +++
 qapi/block-core.json |  22 +-
 5 files changed, 772 insertions(+), 3 deletions(-)
 create mode 100644 block/vxhs.c
block/Makefile.objs +2 -0
index 67a036a..58313a2 100644
@@ -18,6 +18,7 @@ block-obj-$(CONFIG_LIBNFS) += nfs.o
 block-obj-$(CONFIG_CURL) += curl.o
 block-obj-$(CONFIG_RBD) += rbd.o
 block-obj-$(CONFIG_GLUSTERFS) += gluster.o
+block-obj-$(CONFIG_VXHS) += vxhs.o
 block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o
 block-obj-$(CONFIG_LIBSSH2) += ssh.o
 block-obj-y += accounting.o dirty-bitmap.o
@@ -38,6 +39,7 @@ rbd.o-cflags       := $(RBD_CFLAGS)
 rbd.o-libs         := $(RBD_LIBS)
 gluster.o-cflags   := $(GLUSTERFS_CFLAGS)
 gluster.o-libs     := $(GLUSTERFS_LIBS)
+vxhs.o-libs        := $(VXHS_LIBS)
 ssh.o-cflags       := $(LIBSSH2_CFLAGS)
 ssh.o-libs         := $(LIBSSH2_LIBS)
 archipelago.o-libs := $(ARCHIPELAGO_LIBS)
block/trace-events +21 -0
index aff8a96..5cb8089 100644
@@ -113,3 +113,24 @@ qed_aio_write_data(void *s, void *acb, int ret, uint64_t offset, size_t len) "s
 qed_aio_write_prefill(void *s, void *acb, uint64_t start, size_t len, uint64_t offset) "s %p acb %p start %"PRIu64" len %zu offset %"PRIu64
 qed_aio_write_postfill(void *s, void *acb, uint64_t start, size_t len, uint64_t offset) "s %p acb %p start %"PRIu64" len %zu offset %"PRIu64
 qed_aio_write_main(void *s, void *acb, int ret, uint64_t offset, size_t len) "s %p acb %p ret %d offset %"PRIu64" len %zu"
+
+# block/vxhs.c
+vxhs_iio_callback(int error, int reason) "ctx is NULL: error %d, reason %d"
+vxhs_setup_qnio(void *s) "Context to HyperScale IO manager = %p"
+vxhs_iio_callback_chnfail(int err, int error) "QNIO channel failed, no i/o %d, %d"
+vxhs_iio_callback_unknwn(int opcode, int err) "unexpected opcode %d, errno %d"
+vxhs_open_fail(int ret) "Could not open the device. Error = %d"
+vxhs_open_epipe(int ret) "Could not create a pipe for device. Bailing out. Error=%d"
+vxhs_aio_rw_invalid(int req) "Invalid I/O request iodir %d"
+vxhs_aio_rw_ioerr(char *guid, int iodir, uint64_t size, uint64_t off, void *acb, int ret, int err) "IO ERROR (vDisk %s) FOR : Read/Write = %d size = %lu offset = %lu ACB = %p. Error = %d, errno = %d"
+vxhs_get_vdisk_stat_err(char *guid, int ret, int err) "vDisk (%s) stat ioctl failed, ret = %d, errno = %d"
+vxhs_get_vdisk_stat(char *vdisk_guid, uint64_t vdisk_size) "vDisk %s stat ioctl returned size %lu"
+vxhs_qnio_iio_open(const char *ip) "Failed to connect to storage agent on host-ip %s"
+vxhs_qnio_iio_devopen(const char *fname) "Failed to open vdisk device: %s"
+vxhs_complete_aio(void *acb, uint64_t ret) "aio failed acb %p ret %ld"
+vxhs_parse_uri_filename(const char *filename) "URI passed via bdrv_parse_filename %s"
+vxhs_qemu_init_vdisk(const char *vdisk_id) "vdisk-id from json %s"
+vxhs_parse_uri_hostinfo(int num, char *host, int port) "Host %d: IP %s, Port %d"
+vxhs_qemu_init(char *of_vsa_addr, int port) "Adding host %s:%d to BDRVVXHSState"
+vxhs_qemu_init_filename(const char *filename) "Filename passed as %s"
+vxhs_close(char *vdisk_guid) "Closing vdisk %s"
block/vxhs.c new file +689 -0

689 lines not on this page · raw message

configure +41 -0

77 lines not on this page · raw message

qapi/block-core.json +19 -3
index 5af040b..f1c650f 100644
@@ -1714,7 +1714,7 @@
 #
 # @host_device, @host_cdrom: Since 2.1
 # @gluster: Since 2.7
-# @nbd, @nfs, @replication, @ssh: Since 2.8
+# @nbd, @nfs, @replication, @ssh, @vxhs: Since 2.8
 #
 # Since: 2.0
 ##
@@ -1724,7 +1724,7 @@
             'host_device', 'http', 'https', 'luks', 'nbd', 'nfs', 'null-aio',
             'null-co', 'parallels', 'qcow', 'qcow2', 'qed', 'quorum', 'raw',
             'replication', 'ssh', 'tftp', 'vdi', 'vhdx', 'vmdk', 'vpc',
-            'vvfat' ] }
+            'vvfat','vxhs' ] }
 
 ##
 # @BlockdevOptionsFile
@@ -2352,6 +2352,21 @@
   'data': { '*offset': 'int', '*size': 'int' } }
 
 ##
+# @BlockdevOptionsVxHS
+#
+# Driver specific block device options for VxHS
+#
+# @vdisk-id:    UUID of VxHS volume
+#
+# @server:      vxhs server IP, port
+#
+# Since: 2.8
+##
+{ 'struct': 'BlockdevOptionsVxHS',
+  'data': { 'vdisk-id': 'str',
+            'server': 'InetSocketAddress' } }
+
+##
 # @BlockdevOptions
 #
 # Options for creating a block device.  Many options are available for all
@@ -2415,7 +2430,8 @@
       'vhdx':       'BlockdevOptionsGenericFormat',
       'vmdk':       'BlockdevOptionsGenericCOWFormat',
       'vpc':        'BlockdevOptionsGenericFormat',
-      'vvfat':      'BlockdevOptionsVVFAT'
+      'vvfat':      'BlockdevOptionsVVFAT',
+      'vxhs':       'BlockdevOptionsVxHS'
   } }
 
 ##
Signature · 1 line
2.5.5
#1 lore raw
Quoted 3 lines · Ashish Mittal

Source code for the qnio library that this code loads can be downloaded from:
https://github.com/MittalAshish/libqnio.git

Your patch is unable to compile against this, because the qnio_api.h header is using a "struct iovec" type in its APIs, but not including any header to define that type. This causes configure to fail

cc -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_GNU_SOURCE -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -I/home/berrange/src/external/libqnio/src -Wendif-labels -Wno-shift-negative-value -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -L/home/berrange/src/external/libqnio/src -lqnio In file included from config-temp/qemu-conf.c:2:0:
/home/berrange/src/external/libqnio/src/qnio/qnio_api.h:186:54: error: ‘struct iovec’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
int32_t iio_writev(void *apictx, int32_t rfd, struct iovec *iov, int iovcnt,

                                                      ^~~~~
/home/berrange/src/external/libqnio/src/qnio/qnio_api.h:189:53: error: ‘struct iovec’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 int32_t iio_readv(void *apictx, int32_t rfd, struct iovec *iov, int iovcnt,
                                                     ^~~~~

cc1: all warnings being treated as errors

Regards,
Daniel

Signature · 3 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
#2 lore raw

Hi Daniel,

Thanks for pointing that out. I had done a fresh configure and make before submitting the patch. I am somehow not able to reproduce that error!

Checked out fresh source just now and tried again, still no luck.

[root@rhel72ga-build-upstream qemu] 2016-11-01 08:51:15$ git apply ~/qemu/31Oct2016/0001-block-vxhs.c-Add-support-for-a-new-block-device-type.patch [root@rhel72ga-build-upstream qemu] 2016-11-01 08:51:31$ ./configure --enable-vxhs

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin

library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M

Source path       /root/qemu_second_buildarea/qemu
C compiler        cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS       -I/usr/include/pixman-1    -Werror

-DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits
-fstack-protector-strong -I/usr/include/p11-kit-1
-I/usr/include/libpng15 -I/usr/include/spice-server
-I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/spice-1 -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/libusb-1.0

LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no

target list aarch64-softmmu alpha-softmmu arm-softmmu
cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu microblazeel-softmmu microblaze-softmmu mips64el-softmmu mips64-softmmu mipsel-softmmu mips-softmmu moxie-softmmu or32-softmmu ppc64-softmmu ppcemb-softmmu ppc-softmmu s390x-softmmu sh4eb-softmmu sh4-softmmu sparc64-softmmu sparc-softmmu tricore-softmmu unicore32-softmmu x86_64-softmmu xtensaeb-softmmu xtensa-softmmu aarch64-linux-user alpha-linux-user armeb-linux-user arm-linux-user cris-linux-user i386-linux-user m68k-linux-user microblazeel-linux-user microblaze-linux-user mips64el-linux-user mips64-linux-user mipsel-linux-user mips-linux-user mipsn32el-linux-user mipsn32-linux-user or32-linux-user ppc64abi32-linux-user ppc64le-linux-user ppc64-linux-user ppc-linux-user s390x-linux-user sh4eb-linux-user sh4-linux-user sparc32plus-linux-user sparc64-linux-user sparc-linux-user tilegx-linux-user x86_64-linux-user
tcg debug enabled no

gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (1.2.15)
GTK support       no
GTK GL support    no
VTE support       no
TLS priority      NORMAL
GNUTLS support    yes
GNUTLS rnd        yes
libgcrypt         no
libgcrypt kdf     no
nettle            yes (2.7.1)
nettle kdf        yes
libtasn1          yes
curses support    yes
virgl support     no
curl support      yes
mingw32 support   no
Audio drivers     oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support    yes
VNC support       yes
VNC SASL support  yes
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    yes
bluez  support    yes
Documentation     yes
PIE               yes
vde support       no
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
COLO support      yes
RDMA support      yes
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes

libcap-ng support yes
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes

Trace backends    log
spice support     yes (0.12.6/0.12.4)
rbd support       yes
xfsctl support    no
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  yes
libnfs support    no

build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support yes
coroutine backend ucontext
coroutine pool yes
debug stack usage no
GlusterFS support yes
Archipelago support no

gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   yes
QOM debugging     yes
lzo support       yes
snappy support    yes
bzip2 support     no

NUMA host support yes
tcmalloc support no
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device yes
[root@rhel72ga-build-upstream qemu] 2016-11-01 08:52:22$ echo $? 0

Am I missing some step here?
Should I just add #include <sys/uio.h> to qnio_api.h ? Doing a build on all platforms right now.

Regards,
Ashish

Quoted 27 lines · Daniel P. Berrange
Quoted 3 lines · Ashish Mittal

Source code for the qnio library that this code loads can be downloaded from:
https://github.com/MittalAshish/libqnio.git

Your patch is unable to compile against this, because the qnio_api.h header is using a "struct iovec" type in its APIs, but not including any header to define that type. This causes configure to fail

cc -Werror -DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_GNU_SOURCE -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -I/home/berrange/src/external/libqnio/src -Wendif-labels -Wno-shift-negative-value -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/include/p11-kit-1 -I/usr/include/libpng16 -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libusb-1.0 -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -L/home/berrange/src/external/libqnio/src -lqnio In file included from config-temp/qemu-conf.c:2:0:
/home/berrange/src/external/libqnio/src/qnio/qnio_api.h:186:54: error: ‘struct iovec’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
int32_t iio_writev(void *apictx, int32_t rfd, struct iovec *iov, int iovcnt,

                                                      ^~~~~
/home/berrange/src/external/libqnio/src/qnio/qnio_api.h:189:53: error: ‘struct iovec’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 int32_t iio_readv(void *apictx, int32_t rfd, struct iovec *iov, int iovcnt,
                                                     ^~~~~

cc1: all warnings being treated as errors

Regards,
Daniel
--

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
#3 lore raw
Quoted 163 lines · ashish mittal

Hi Daniel,

Thanks for pointing that out. I had done a fresh configure and make before submitting the patch. I am somehow not able to reproduce that error!

Checked out fresh source just now and tried again, still no luck.

[root@rhel72ga-build-upstream qemu] 2016-11-01 08:51:15$ git apply ~/qemu/31Oct2016/0001-block-vxhs.c-Add-support-for-a-new-block-device-type.patch [root@rhel72ga-build-upstream qemu] 2016-11-01 08:51:31$ ./configure --enable-vxhs

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin

library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M

Source path       /root/qemu_second_buildarea/qemu
C compiler        cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS       -I/usr/include/pixman-1    -Werror
(quoted diff) +0 -15
-DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include     -fPIE -DPIE -m64 -mcx16
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
-Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wold-style-declaration -Wold-style-definition -Wtype-limits
-fstack-protector-strong   -I/usr/include/p11-kit-1
-I/usr/include/libpng15   -I/usr/include/spice-server
-I/usr/include/cacard -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/spice-1
-I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4
-I/usr/include/libusb-1.0
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no

target list aarch64-softmmu alpha-softmmu arm-softmmu
cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu microblazeel-softmmu microblaze-softmmu mips64el-softmmu mips64-softmmu mipsel-softmmu mips-softmmu moxie-softmmu or32-softmmu ppc64-softmmu ppcemb-softmmu ppc-softmmu s390x-softmmu sh4eb-softmmu sh4-softmmu sparc64-softmmu sparc-softmmu tricore-softmmu unicore32-softmmu x86_64-softmmu xtensaeb-softmmu xtensa-softmmu aarch64-linux-user alpha-linux-user armeb-linux-user arm-linux-user cris-linux-user i386-linux-user m68k-linux-user microblazeel-linux-user microblaze-linux-user mips64el-linux-user mips64-linux-user mipsel-linux-user mips-linux-user mipsn32el-linux-user mipsn32-linux-user or32-linux-user ppc64abi32-linux-user ppc64le-linux-user ppc64-linux-user ppc-linux-user s390x-linux-user sh4eb-linux-user sh4-linux-user sparc32plus-linux-user sparc64-linux-user sparc-linux-user tilegx-linux-user x86_64-linux-user
tcg debug enabled no

gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (1.2.15)
GTK support       no
GTK GL support    no
VTE support       no
TLS priority      NORMAL
GNUTLS support    yes
GNUTLS rnd        yes
libgcrypt         no
libgcrypt kdf     no
nettle            yes (2.7.1)
nettle kdf        yes
libtasn1          yes
curses support    yes
virgl support     no
curl support      yes
mingw32 support   no
Audio drivers     oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support    yes
VNC support       yes
VNC SASL support  yes
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    yes
bluez  support    yes
Documentation     yes
PIE               yes
vde support       no
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
COLO support      yes
RDMA support      yes
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes

libcap-ng support yes
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes

Trace backends    log
spice support     yes (0.12.6/0.12.4)
rbd support       yes
xfsctl support    no
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  yes
libnfs support    no

build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support yes
coroutine backend ucontext
coroutine pool yes
debug stack usage no
GlusterFS support yes
Archipelago support no

gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   yes
QOM debugging     yes
lzo support       yes
snappy support    yes
bzip2 support     no

NUMA host support yes
tcmalloc support no
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device yes
[root@rhel72ga-build-upstream qemu] 2016-11-01 08:52:22$ echo $? 0

Quoted 3 lines

Am I missing some step here?
Should I just add #include <sys/uio.h> to qnio_api.h ? Doing a build on all platforms right now.

Yes, sys/uio.h seems to be the recommended header file to get the struct iovec definition pulled in.

Regards,
Daniel

Signature · 3 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
#4 lore raw

Done!

All builds are fine, but I have no way of knowing if that fixed the issue! Please let me know if you still see a problem.

[root@rhel72ga-build-upstream qemu] 2016-11-01 09:46:06$ make

  CC      block/vxhs.o
  LINK    qemu-nbd
  LINK    qemu-img
  LINK    qemu-io
  LINK    aarch64-softmmu/qemu-system-aarch64
  LINK    alpha-softmmu/qemu-system-alpha
  LINK    arm-softmmu/qemu-system-arm
  LINK    cris-softmmu/qemu-system-cris
  LINK    i386-softmmu/qemu-system-i386
  LINK    lm32-softmmu/qemu-system-lm32
  LINK    m68k-softmmu/qemu-system-m68k
  LINK    microblazeel-softmmu/qemu-system-microblazeel
  LINK    microblaze-softmmu/qemu-system-microblaze
  LINK    mips64el-softmmu/qemu-system-mips64el
  LINK    mips64-softmmu/qemu-system-mips64
  LINK    mipsel-softmmu/qemu-system-mipsel
  LINK    mips-softmmu/qemu-system-mips
  LINK    moxie-softmmu/qemu-system-moxie
  LINK    or32-softmmu/qemu-system-or32
  LINK    ppc64-softmmu/qemu-system-ppc64
  LINK    ppcemb-softmmu/qemu-system-ppcemb
  LINK    ppc-softmmu/qemu-system-ppc
  LINK    s390x-softmmu/qemu-system-s390x
  LINK    sh4eb-softmmu/qemu-system-sh4eb
  LINK    sh4-softmmu/qemu-system-sh4
  LINK    sparc64-softmmu/qemu-system-sparc64
  LINK    sparc-softmmu/qemu-system-sparc
  LINK    tricore-softmmu/qemu-system-tricore
  LINK    unicore32-softmmu/qemu-system-unicore32
  LINK    x86_64-softmmu/qemu-system-x86_64
  LINK    xtensaeb-softmmu/qemu-system-xtensaeb
  LINK    xtensa-softmmu/qemu-system-xtensa

[root@rhel72ga-build-upstream qemu] 2016-11-01 09:48:13$

Thanks!

Quoted 177 lines · Daniel P. Berrange
Quoted 163 lines · ashish mittal

Hi Daniel,

Thanks for pointing that out. I had done a fresh configure and make before submitting the patch. I am somehow not able to reproduce that error!

Checked out fresh source just now and tried again, still no luck.

[root@rhel72ga-build-upstream qemu] 2016-11-01 08:51:15$ git apply ~/qemu/31Oct2016/0001-block-vxhs.c-Add-support-for-a-new-block-device-type.patch [root@rhel72ga-build-upstream qemu] 2016-11-01 08:51:31$ ./configure --enable-vxhs

Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin

library directory /usr/local/lib
module directory /usr/local/lib/qemu
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M

Source path       /root/qemu_second_buildarea/qemu
C compiler        cc
Host C compiler   cc
C++ compiler      c++
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS       -I/usr/include/pixman-1    -Werror
(quoted diff) +0 -15
-DHAS_LIBSSH2_SFTP_FSYNC -pthread -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include     -fPIE -DPIE -m64 -mcx16
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
-Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wold-style-declaration -Wold-style-definition -Wtype-limits
-fstack-protector-strong   -I/usr/include/p11-kit-1
-I/usr/include/libpng15   -I/usr/include/spice-server
-I/usr/include/cacard -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/spice-1
-I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4
-I/usr/include/libusb-1.0
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no

target list aarch64-softmmu alpha-softmmu arm-softmmu
cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu microblazeel-softmmu microblaze-softmmu mips64el-softmmu mips64-softmmu mipsel-softmmu mips-softmmu moxie-softmmu or32-softmmu ppc64-softmmu ppcemb-softmmu ppc-softmmu s390x-softmmu sh4eb-softmmu sh4-softmmu sparc64-softmmu sparc-softmmu tricore-softmmu unicore32-softmmu x86_64-softmmu xtensaeb-softmmu xtensa-softmmu aarch64-linux-user alpha-linux-user armeb-linux-user arm-linux-user cris-linux-user i386-linux-user m68k-linux-user microblazeel-linux-user microblaze-linux-user mips64el-linux-user mips64-linux-user mipsel-linux-user mips-linux-user mipsn32el-linux-user mipsn32-linux-user or32-linux-user ppc64abi32-linux-user ppc64le-linux-user ppc64-linux-user ppc-linux-user s390x-linux-user sh4eb-linux-user sh4-linux-user sparc32plus-linux-user sparc64-linux-user sparc-linux-user tilegx-linux-user x86_64-linux-user
tcg debug enabled no

gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (1.2.15)
GTK support       no
GTK GL support    no
VTE support       no
TLS priority      NORMAL
GNUTLS support    yes
GNUTLS rnd        yes
libgcrypt         no
libgcrypt kdf     no
nettle            yes (2.7.1)
nettle kdf        yes
libtasn1          yes
curses support    yes
virgl support     no
curl support      yes
mingw32 support   no
Audio drivers     oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support    yes
VNC support       yes
VNC SASL support  yes
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    yes
bluez  support    yes
Documentation     yes
PIE               yes
vde support       no
netmap support    no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
COLO support      yes
RDMA support      yes
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes

libcap-ng support yes
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes

Trace backends    log
spice support     yes (0.12.6/0.12.4)
rbd support       yes
xfsctl support    no
smartcard support yes
libusb            yes
usb net redir     yes
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  yes
libnfs support    no

build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support yes
coroutine backend ucontext
coroutine pool yes
debug stack usage no
GlusterFS support yes
Archipelago support no

gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   yes
QOM debugging     yes
lzo support       yes
snappy support    yes
bzip2 support     no

NUMA host support yes
tcmalloc support no
jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device yes
[root@rhel72ga-build-upstream qemu] 2016-11-01 08:52:22$ echo $? 0

Quoted 3 lines

Am I missing some step here?
Should I just add #include <sys/uio.h> to qnio_api.h ? Doing a build on all platforms right now.

Yes, sys/uio.h seems to be the recommended header file to get the struct iovec definition pulled in.

Regards,
Daniel
--

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
#5 lore raw
Quoted 4 lines · ashish mittal

Done!

All builds are fine, but I have no way of knowing if that fixed the issue! Please let me know if you still see a problem.

configure works for me after pulling your libqnio update

Regards,
Daniel

Signature · 3 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|