203 lines
7.1 KiB
Diff
203 lines
7.1 KiB
Diff
|
diff -NaurpbB qemu-4.2/block/Makefile.objs qemu-4.2/block/Makefile.objs
|
||
|
--- qemu-4.2/block/Makefile.objs 2019-12-13 01:20:47.000000000 +0700
|
||
|
+++ qemu-4.2/block/Makefile.objs 2022-05-19 09:05:29.047996624 +0700
|
||
|
@@ -29,6 +29,7 @@ block-obj-$(if $(CONFIG_LIBISCSI),y,n) +
|
||
|
block-obj-$(CONFIG_LIBNFS) += nfs.o
|
||
|
block-obj-$(CONFIG_CURL) += curl.o
|
||
|
block-obj-$(CONFIG_RBD) += rbd.o
|
||
|
+block-obj-$(CONFIG_VITASTOR) += vitastor.o
|
||
|
block-obj-$(CONFIG_GLUSTERFS) += gluster.o
|
||
|
block-obj-$(CONFIG_VXHS) += vxhs.o
|
||
|
block-obj-$(CONFIG_LIBSSH) += ssh.o
|
||
|
@@ -53,6 +54,8 @@ curl.o-cflags := $(CURL_CFLAGS)
|
||
|
curl.o-libs := $(CURL_LIBS)
|
||
|
rbd.o-cflags := $(RBD_CFLAGS)
|
||
|
rbd.o-libs := $(RBD_LIBS)
|
||
|
+vitastor.o-cflags := $(VITASTOR_CFLAGS)
|
||
|
+vitastor.o-libs := $(VITASTOR_LIBS)
|
||
|
gluster.o-cflags := $(GLUSTERFS_CFLAGS)
|
||
|
gluster.o-libs := $(GLUSTERFS_LIBS)
|
||
|
vxhs.o-libs := $(VXHS_LIBS
|
||
|
diff -NaurpbB qemu-4.2/configure qemu-4.2/configure
|
||
|
--- qemu-4.2/configure 2022-05-19 08:32:27.000000000 +0700
|
||
|
+++ qemu-4.2/configure 2022-05-19 08:52:16.844594720 +0700
|
||
|
@@ -436,6 +436,7 @@ trace_backends="log"
|
||
|
trace_file="trace"
|
||
|
spice=""
|
||
|
rbd=""
|
||
|
+vitastor="yes"
|
||
|
smartcard=""
|
||
|
libusb=""
|
||
|
usb_redir=""
|
||
|
@@ -1317,6 +1318,10 @@ for opt do
|
||
|
;;
|
||
|
--enable-rbd) rbd="yes"
|
||
|
;;
|
||
|
+ --disable-vitastor) vitastor="no"
|
||
|
+ ;;
|
||
|
+ --enable-vitastor) vitastor="yes"
|
||
|
+ ;;
|
||
|
--disable-xfsctl) xfs="no"
|
||
|
;;
|
||
|
--enable-xfsctl) xfs="yes"
|
||
|
@@ -1813,6 +1818,7 @@ disabled with --disable-FEATURE, default
|
||
|
vhost-user vhost-user backend support
|
||
|
spice spice
|
||
|
rbd rados block device (rbd)
|
||
|
+ vitastor vitastor block device
|
||
|
libiscsi iscsi support
|
||
|
libnfs nfs support
|
||
|
smartcard smartcard support (libcacard)
|
||
|
@@ -4015,6 +4021,27 @@ EOF
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
+#########################################
|
||
|
+# vitastor probe
|
||
|
+if test "$vitastor" != "no" ; then
|
||
|
+ cat > $TMPC <<EOF
|
||
|
+#include <vitastor_c.h>
|
||
|
+int main(void) {
|
||
|
+ vitastor_c_create_qemu(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||
|
+ return 0;
|
||
|
+}
|
||
|
+EOF
|
||
|
+ vitastor_libs="-lvitastor_client"
|
||
|
+ if compile_prog "" "$vitastor_libs" ; then
|
||
|
+ vitastor=yes
|
||
|
+ else
|
||
|
+ if test "$vitastor" = "yes" ; then
|
||
|
+ feature_not_found "vitastor block device" "Install vitastor-client-dev"
|
||
|
+ fi
|
||
|
+ vitastor=no
|
||
|
+ fi
|
||
|
+fi
|
||
|
+
|
||
|
##########################################
|
||
|
# libssh probe
|
||
|
if test "$libssh" != "no" ; then
|
||
|
@@ -6586,6 +6613,7 @@ echo "Trace output file $trace_file-<pid
|
||
|
fi
|
||
|
echo "spice support $spice $(echo_version $spice $spice_protocol_version/$spice_server_version)"
|
||
|
echo "rbd support $rbd"
|
||
|
+echo "vitastor support $vitastor"
|
||
|
echo "xfsctl support $xfs"
|
||
|
echo "smartcard support $smartcard"
|
||
|
echo "libusb $libusb"
|
||
|
@@ -7222,6 +7250,11 @@ if test "$rbd" = "yes" ; then
|
||
|
echo "RBD_CFLAGS=$rbd_cflags" >> $config_host_mak
|
||
|
echo "RBD_LIBS=$rbd_libs" >> $config_host_mak
|
||
|
fi
|
||
|
+if test "$vitastor" = "yes" ; then
|
||
|
+ echo "CONFIG_VITASTOR=m" >> $config_host_mak
|
||
|
+ echo "VITASTOR_CFLAGS=$vitastor_cflags" >> $config_host_mak
|
||
|
+ echo "VITASTOR_LIBS=$vitastor_libs" >> $config_host_mak
|
||
|
+fi
|
||
|
|
||
|
echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
|
||
|
if test "$coroutine_pool" = "yes" ; then
|
||
|
diff -NaurpbB qemu-4.2/qapi/block-core.json qemu-4.2/qapi/block-core.json
|
||
|
--- qemu-4.2/qapi/block-core.json 2022-05-19 08:32:27.000000000 +0700
|
||
|
+++ qemu-4.2/qapi/block-core.json 2022-05-19 09:14:38.869133795 +0700
|
||
|
@@ -2894,7 +2894,7 @@
|
||
|
'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow',
|
||
|
'qcow2', 'qed', 'quorum', 'raw', 'rbd',
|
||
|
{ 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' },
|
||
|
- 'sheepdog',
|
||
|
+ 'sheepdog', 'vitastor',
|
||
|
'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
|
||
|
|
||
|
##
|
||
|
@@ -3728,6 +3728,28 @@
|
||
|
'*tag': 'str' } }
|
||
|
|
||
|
##
|
||
|
+# @BlockdevOptionsVitastor:
|
||
|
+#
|
||
|
+# Driver specific block device options for vitastor
|
||
|
+#
|
||
|
+# @image: Image name
|
||
|
+# @inode: Inode number
|
||
|
+# @pool: Pool ID
|
||
|
+# @size: Desired image size in bytes
|
||
|
+# @config-path: Path to Vitastor configuration
|
||
|
+# @etcd-host: etcd connection address(es)
|
||
|
+# @etcd-prefix: etcd key/value prefix
|
||
|
+##
|
||
|
+{ 'struct': 'BlockdevOptionsVitastor',
|
||
|
+ 'data': { '*inode': 'uint64',
|
||
|
+ '*pool': 'uint64',
|
||
|
+ '*size': 'uint64',
|
||
|
+ '*image': 'str',
|
||
|
+ '*config-path': 'str',
|
||
|
+ '*etcd-host': 'str',
|
||
|
+ '*etcd-prefix': 'str' } }
|
||
|
+
|
||
|
+##
|
||
|
# @ReplicationMode:
|
||
|
#
|
||
|
# An enumeration of replication modes.
|
||
|
@@ -4087,6 +4109,7 @@
|
||
|
'replication': { 'type': 'BlockdevOptionsReplication',
|
||
|
'if': 'defined(CONFIG_REPLICATION)' },
|
||
|
'sheepdog': 'BlockdevOptionsSheepdog',
|
||
|
+ 'vitastor': 'BlockdevOptionsVitastor',
|
||
|
'ssh': 'BlockdevOptionsSsh',
|
||
|
'throttle': 'BlockdevOptionsThrottle',
|
||
|
'vdi': 'BlockdevOptionsGenericFormat',
|
||
|
@@ -4457,6 +4480,17 @@
|
||
|
'*cluster-size' : 'size' } }
|
||
|
|
||
|
##
|
||
|
+# @BlockdevCreateOptionsVitastor:
|
||
|
+#
|
||
|
+# Driver specific image creation options for Vitastor.
|
||
|
+#
|
||
|
+# @size: Size of the virtual disk in bytes
|
||
|
+##
|
||
|
+{ 'struct': 'BlockdevCreateOptionsVitastor',
|
||
|
+ 'data': { 'location': 'BlockdevOptionsVitastor',
|
||
|
+ 'size': 'size' } }
|
||
|
+
|
||
|
+##
|
||
|
# @BlockdevVmdkSubformat:
|
||
|
#
|
||
|
# Subformat options for VMDK images
|
||
|
@@ -4718,6 +4752,7 @@
|
||
|
'qed': 'BlockdevCreateOptionsQed',
|
||
|
'rbd': 'BlockdevCreateOptionsRbd',
|
||
|
'sheepdog': 'BlockdevCreateOptionsSheepdog',
|
||
|
+ 'vitastor': 'BlockdevCreateOptionsVitastor',
|
||
|
'ssh': 'BlockdevCreateOptionsSsh',
|
||
|
'vdi': 'BlockdevCreateOptionsVdi',
|
||
|
'vhdx': 'BlockdevCreateOptionsVhdx',
|
||
|
diff -NaurpbB qemu-4.2/debian/rules qemu-4.2/debian/rules
|
||
|
--- qemu-4.2/debian/rules 2022-05-19 15:34:26.354263017 +0700
|
||
|
+++ qemu-4.2/debian/rules 2022-05-19 15:32:15.720952678 +0700
|
||
|
@@ -148,7 +148,7 @@ ifneq ($(filter $(DEB_HOST_ARCH),amd64 i
|
||
|
--${enable_system}-system \
|
||
|
--disable-linux-user \
|
||
|
--enable-xen \
|
||
|
- --target-list="aarch64-softmmu arm-softmmu i386-softmmu x86_64-softmmu"
|
||
|
+ --target-list="aarch64-softmmu arm-softmmu i386-softmmu x86_64-softmmu" \
|
||
|
--enable-modules \
|
||
|
--enable-module-upgrades \
|
||
|
$(shell sh debian/extract-config-opts \
|
||
|
@@ -167,7 +167,7 @@ ifneq ($(filter $(DEB_HOST_ARCH),amd64),
|
||
|
cd b/qemu-microvm && \
|
||
|
../../configure ${common_configure_opts} --disable-user \
|
||
|
--enable-system --enable-kvm \
|
||
|
- --disable-linux-user --disable-modules --disable-docs \
|
||
|
+ --disable-linux-user --enable-modules --disable-docs \
|
||
|
--disable-libssh --disable-tcmalloc --disable-glusterfs \
|
||
|
--disable-seccomp --disable-bzip2 --disable-slirp --disable-vde \
|
||
|
--disable-netmap --disable-hax --disable-hvf --disable-whpx \
|
||
|
@@ -201,7 +201,7 @@ ifeq ($(enable_linux_user),enable)
|
||
|
rm -rf b/user-static; mkdir b/user-static
|
||
|
cd b/user-static && \
|
||
|
../../configure ${common_configure_opts} \
|
||
|
- --static --disable-system --disable-xen \
|
||
|
+ --enable-modules --enable-module-upgrades --disable-system --disable-xen \
|
||
|
--target-list="$(addsuffix -linux-user,${user_targets})"
|
||
|
endif
|
||
|
touch $@
|