2021-12-02 01:27:00 +03:00
|
|
|
diff --git a/block/Makefile.objs b/block/Makefile.objs
|
|
|
|
index 3635b6b4c1..6cdf6df6ff 100644
|
|
|
|
--- a/block/Makefile.objs
|
|
|
|
+++ b/block/Makefile.objs
|
|
|
|
@@ -30,6 +30,7 @@ block-obj-$(if $(CONFIG_LIBISCSI),y,n) += iscsi-opts.o
|
|
|
|
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
|
|
|
|
@@ -58,6 +59,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 --git a/configure b/configure
|
|
|
|
index 23b5e93752..7400cb9546 100755
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
|
|
|
@@ -438,6 +438,7 @@ trace_backends="log"
|
|
|
|
trace_file="trace"
|
|
|
|
spice=""
|
|
|
|
rbd=""
|
|
|
|
+vitastor=""
|
|
|
|
smartcard=""
|
|
|
|
libusb=""
|
|
|
|
usb_redir=""
|
|
|
|
@@ -1355,6 +1356,10 @@ for opt do
|
|
|
|
;;
|
|
|
|
--enable-rbd) rbd="yes"
|
|
|
|
;;
|
|
|
|
+ --disable-vitastor) vitastor="no"
|
|
|
|
+ ;;
|
|
|
|
+ --enable-vitastor) vitastor="yes"
|
|
|
|
+ ;;
|
|
|
|
--disable-xfsctl) xfs="no"
|
|
|
|
;;
|
|
|
|
--enable-xfsctl) xfs="yes"
|
|
|
|
@@ -1848,6 +1853,7 @@ disabled with --disable-FEATURE, default is enabled if available:
|
|
|
|
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)
|
|
|
|
@@ -4088,6 +4094,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
|
|
|
|
@@ -6679,6 +6706,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"
|
|
|
|
@@ -7329,6 +7357,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 --git a/qapi/block-core.json b/qapi/block-core.json
|
|
|
|
index 943df1926a..c4f23230a3 100644
|
|
|
|
--- a/qapi/block-core.json
|
|
|
|
+++ b/qapi/block-core.json
|
2020-11-04 23:30:51 +03:00
|
|
|
@@ -2798,7 +2798,7 @@
|
|
|
|
'luks', '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' ] }
|
|
|
|
|
|
|
|
##
|
2021-12-02 01:27:00 +03:00
|
|
|
@@ -3634,6 +3634,28 @@
|
|
|
|
'*snap-id': 'uint32',
|
2020-11-04 23:30:51 +03:00
|
|
|
'*tag': 'str' } }
|
|
|
|
|
2021-12-02 01:27:00 +03:00
|
|
|
+##
|
2020-11-04 23:30:51 +03:00
|
|
|
+# @BlockdevOptionsVitastor:
|
|
|
|
+#
|
|
|
|
+# Driver specific block device options for vitastor
|
|
|
|
+#
|
2021-07-08 01:08:27 +03:00
|
|
|
+# @image: Image name
|
2020-11-04 23:30:51 +03:00
|
|
|
+# @inode: Inode number
|
|
|
|
+# @pool: Pool ID
|
|
|
|
+# @size: Desired image size in bytes
|
2021-11-21 16:16:46 +03:00
|
|
|
+# @config-path: Path to Vitastor configuration
|
|
|
|
+# @etcd-host: etcd connection address(es)
|
|
|
|
+# @etcd-prefix: etcd key/value prefix
|
2020-11-04 23:30:51 +03:00
|
|
|
+##
|
|
|
|
+{ 'struct': 'BlockdevOptionsVitastor',
|
2021-07-08 01:08:27 +03:00
|
|
|
+ 'data': { '*inode': 'uint64',
|
|
|
|
+ '*pool': 'uint64',
|
|
|
|
+ '*size': 'uint64',
|
|
|
|
+ '*image': 'str',
|
2021-11-21 16:16:46 +03:00
|
|
|
+ '*config-path': 'str',
|
|
|
|
+ '*etcd-host': 'str',
|
|
|
|
+ '*etcd-prefix': 'str' } }
|
2020-11-04 23:30:51 +03:00
|
|
|
+
|
2021-12-02 01:27:00 +03:00
|
|
|
##
|
2020-11-04 23:30:51 +03:00
|
|
|
# @ReplicationMode:
|
|
|
|
#
|
2021-12-02 01:27:00 +03:00
|
|
|
@@ -3995,6 +4017,7 @@
|
2020-11-04 23:30:51 +03:00
|
|
|
'replication': { 'type': 'BlockdevOptionsReplication',
|
|
|
|
'if': 'defined(CONFIG_REPLICATION)' },
|
|
|
|
'sheepdog': 'BlockdevOptionsSheepdog',
|
|
|
|
+ 'vitastor': 'BlockdevOptionsVitastor',
|
|
|
|
'ssh': 'BlockdevOptionsSsh',
|
|
|
|
'throttle': 'BlockdevOptionsThrottle',
|
|
|
|
'vdi': 'BlockdevOptionsGenericFormat',
|
2021-12-02 01:27:00 +03:00
|
|
|
@@ -4364,6 +4387,17 @@
|
|
|
|
'size': 'size',
|
2020-11-04 23:30:51 +03:00
|
|
|
'*cluster-size' : 'size' } }
|
|
|
|
|
2021-12-02 01:27:00 +03:00
|
|
|
+##
|
2020-11-04 23:30:51 +03:00
|
|
|
+# @BlockdevCreateOptionsVitastor:
|
|
|
|
+#
|
|
|
|
+# Driver specific image creation options for Vitastor.
|
|
|
|
+#
|
|
|
|
+# @size: Size of the virtual disk in bytes
|
|
|
|
+##
|
|
|
|
+{ 'struct': 'BlockdevCreateOptionsVitastor',
|
|
|
|
+ 'data': { 'location': 'BlockdevOptionsVitastor',
|
|
|
|
+ 'size': 'size' } }
|
|
|
|
+
|
2021-12-02 01:27:00 +03:00
|
|
|
##
|
2020-11-04 23:30:51 +03:00
|
|
|
# @BlockdevVmdkSubformat:
|
|
|
|
#
|
2021-12-02 01:27:00 +03:00
|
|
|
@@ -4626,6 +4660,7 @@
|
2020-11-04 23:30:51 +03:00
|
|
|
'qed': 'BlockdevCreateOptionsQed',
|
|
|
|
'rbd': 'BlockdevCreateOptionsRbd',
|
|
|
|
'sheepdog': 'BlockdevCreateOptionsSheepdog',
|
|
|
|
+ 'vitastor': 'BlockdevCreateOptionsVitastor',
|
|
|
|
'ssh': 'BlockdevCreateOptionsSsh',
|
|
|
|
'vdi': 'BlockdevCreateOptionsVdi',
|
|
|
|
'vhdx': 'BlockdevCreateOptionsVhdx',
|