forked from vitalif/vitastor
Update QEMU 4.2 patch and CentOS 7 QEMU 4.2 spec patch
parent
09a3987e83
commit
15957b7d13
|
@ -1,8 +1,105 @@
|
||||||
Index: qemu/qapi/block-core.json
|
diff -NaurpbB qemu-4.2.0/block/Makefile.objs qemu-4.2.0-vitastor/block/Makefile.objs
|
||||||
===================================================================
|
--- qemu-4.2.0/block/Makefile.objs 2019-12-12 18:20:47.000000000 +0000
|
||||||
--- qemu.orig/qapi/block-core.json 2020-11-07 22:57:38.932613674 +0000
|
+++ qemu-4.2.0-vitastor/block/Makefile.objs 2021-12-01 21:28:47.342341760 +0000
|
||||||
+++ qemu.orig/qapi/block-core.json 2020-11-07 22:59:49.890722862 +0000
|
@@ -29,6 +29,7 @@ block-obj-$(if $(CONFIG_LIBISCSI),y,n) +
|
||||||
@@ -2907,7 +2907,7 @@
|
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.0/configure qemu-4.2.0-vitastor/configure
|
||||||
|
--- qemu-4.2.0/configure 2019-12-12 18:20:47.000000000 +0000
|
||||||
|
+++ qemu-4.2.0-vitastor/configure 2021-12-01 21:30:24.605237562 +0000
|
||||||
|
@@ -435,6 +435,7 @@ trace_backends="log"
|
||||||
|
trace_file="trace"
|
||||||
|
spice=""
|
||||||
|
rbd=""
|
||||||
|
+vitastor=""
|
||||||
|
smartcard=""
|
||||||
|
libusb=""
|
||||||
|
usb_redir=""
|
||||||
|
@@ -1312,6 +1313,10 @@ for opt do
|
||||||
|
;;
|
||||||
|
--enable-rbd) rbd="yes"
|
||||||
|
;;
|
||||||
|
+ --disable-vitastor) vitastor="no"
|
||||||
|
+ ;;
|
||||||
|
+ --enable-vitastor) vitastor="yes"
|
||||||
|
+ ;;
|
||||||
|
--disable-xfsctl) xfs="no"
|
||||||
|
;;
|
||||||
|
--enable-xfsctl) xfs="yes"
|
||||||
|
@@ -1782,6 +1787,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)
|
||||||
|
@@ -3980,6 +3986,27 @@ EOF
|
||||||
|
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
|
||||||
|
if $pkg_config --exists libssh; then
|
||||||
|
@@ -6549,6 +6576,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"
|
||||||
|
@@ -7182,6 +7210,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.0/qapi/block-core.json qemu-4.2.0-vitastor/qapi/block-core.json
|
||||||
|
--- qemu-4.2.0/qapi/block-core.json 2019-12-12 18:20:48.000000000 +0000
|
||||||
|
+++ qemu-4.2.0-vitastor/qapi/block-core.json 2021-12-01 21:27:49.213574396 +0000
|
||||||
|
@@ -2894,7 +2894,7 @@
|
||||||
'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow',
|
'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow',
|
||||||
'qcow2', 'qed', 'quorum', 'raw', 'rbd',
|
'qcow2', 'qed', 'quorum', 'raw', 'rbd',
|
||||||
{ 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' },
|
{ 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' },
|
||||||
|
@ -11,7 +108,7 @@ Index: qemu/qapi/block-core.json
|
||||||
'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
|
'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -3725,6 +3725,28 @@
|
@@ -3712,6 +3712,28 @@
|
||||||
'*tag': 'str' } }
|
'*tag': 'str' } }
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -40,7 +137,7 @@ Index: qemu/qapi/block-core.json
|
||||||
# @ReplicationMode:
|
# @ReplicationMode:
|
||||||
#
|
#
|
||||||
# An enumeration of replication modes.
|
# An enumeration of replication modes.
|
||||||
@@ -4084,6 +4102,7 @@
|
@@ -4071,6 +4093,7 @@
|
||||||
'replication': { 'type': 'BlockdevOptionsReplication',
|
'replication': { 'type': 'BlockdevOptionsReplication',
|
||||||
'if': 'defined(CONFIG_REPLICATION)' },
|
'if': 'defined(CONFIG_REPLICATION)' },
|
||||||
'sheepdog': 'BlockdevOptionsSheepdog',
|
'sheepdog': 'BlockdevOptionsSheepdog',
|
||||||
|
@ -48,7 +145,7 @@ Index: qemu/qapi/block-core.json
|
||||||
'ssh': 'BlockdevOptionsSsh',
|
'ssh': 'BlockdevOptionsSsh',
|
||||||
'throttle': 'BlockdevOptionsThrottle',
|
'throttle': 'BlockdevOptionsThrottle',
|
||||||
'vdi': 'BlockdevOptionsGenericFormat',
|
'vdi': 'BlockdevOptionsGenericFormat',
|
||||||
@@ -4461,6 +4480,17 @@
|
@@ -4441,6 +4464,17 @@
|
||||||
'*cluster-size' : 'size' } }
|
'*cluster-size' : 'size' } }
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -66,7 +163,7 @@ Index: qemu/qapi/block-core.json
|
||||||
# @BlockdevVmdkSubformat:
|
# @BlockdevVmdkSubformat:
|
||||||
#
|
#
|
||||||
# Subformat options for VMDK images
|
# Subformat options for VMDK images
|
||||||
@@ -4722,6 +4752,7 @@
|
@@ -4702,6 +4736,7 @@
|
||||||
'qed': 'BlockdevCreateOptionsQed',
|
'qed': 'BlockdevCreateOptionsQed',
|
||||||
'rbd': 'BlockdevCreateOptionsRbd',
|
'rbd': 'BlockdevCreateOptionsRbd',
|
||||||
'sheepdog': 'BlockdevCreateOptionsSheepdog',
|
'sheepdog': 'BlockdevCreateOptionsSheepdog',
|
||||||
|
@ -74,15 +171,3 @@ Index: qemu/qapi/block-core.json
|
||||||
'ssh': 'BlockdevCreateOptionsSsh',
|
'ssh': 'BlockdevCreateOptionsSsh',
|
||||||
'vdi': 'BlockdevCreateOptionsVdi',
|
'vdi': 'BlockdevCreateOptionsVdi',
|
||||||
'vhdx': 'BlockdevCreateOptionsVhdx',
|
'vhdx': 'BlockdevCreateOptionsVhdx',
|
||||||
Index: qemu/scripts/modules/module_block.py
|
|
||||||
===================================================================
|
|
||||||
--- qemu.orig/scripts/modules/module_block.py 2020-11-07 22:57:38.936613739 +0000
|
|
||||||
+++ qemu/scripts/modules/module_block.py 2020-11-07 22:59:49.890722862 +0000
|
|
||||||
@@ -86,6 +86,7 @@ def print_bottom(fheader):
|
|
||||||
output_file = sys.argv[1]
|
|
||||||
with open(output_file, 'w') as fheader:
|
|
||||||
print_top(fheader)
|
|
||||||
+ add_module(fheader, "vitastor", "vitastor", "vitastor")
|
|
||||||
|
|
||||||
for filename in sys.argv[2:]:
|
|
||||||
if os.path.isfile(filename):
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- qemu-kvm.spec.orig 2020-11-09 23:41:03.000000000 +0000
|
--- qemu-kvm.spec.orig 2020-11-09 23:41:03.000000000 +0000
|
||||||
+++ qemu-kvm.spec 2020-12-06 10:44:24.207640963 +0000
|
+++ qemu-kvm.spec 2021-12-01 21:53:30.895747529 +0000
|
||||||
@@ -2,7 +2,7 @@
|
@@ -2,7 +2,7 @@
|
||||||
%global SLOF_gittagcommit 899d9883
|
%global SLOF_gittagcommit 899d9883
|
||||||
|
|
||||||
|
@ -9,25 +9,24 @@
|
||||||
%global have_opengl 1
|
%global have_opengl 1
|
||||||
%global have_fdt 0
|
%global have_fdt 0
|
||||||
%global have_gluster 1
|
%global have_gluster 1
|
||||||
@@ -56,7 +56,7 @@ Requires: %{name}-block-curl = %{epoch}:
|
@@ -57,6 +57,7 @@ Requires: %{name}-block-gluster = %{epoc
|
||||||
Requires: %{name}-block-gluster = %{epoch}:%{version}-%{release} \
|
|
||||||
%endif \
|
%endif \
|
||||||
Requires: %{name}-block-iscsi = %{epoch}:%{version}-%{release} \
|
Requires: %{name}-block-iscsi = %{epoch}:%{version}-%{release} \
|
||||||
-Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \
|
Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \
|
||||||
+#Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \
|
+Requires: %{name}-block-vitastor = %{epoch}:%{version}-%{release}\
|
||||||
Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release}
|
Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
# Macro to properly setup RHEL/RHEV conflict handling
|
# Macro to properly setup RHEL/RHEV conflict handling
|
||||||
@@ -67,7 +67,7 @@ Obsoletes: %1-rhev
|
@@ -67,7 +68,7 @@ Obsoletes: %1-rhev
|
||||||
Summary: QEMU is a machine emulator and virtualizer
|
Summary: QEMU is a machine emulator and virtualizer
|
||||||
Name: qemu-kvm
|
Name: qemu-kvm
|
||||||
Version: 4.2.0
|
Version: 4.2.0
|
||||||
-Release: 29.vitastor%{?dist}.6
|
-Release: 29.vitastor%{?dist}.6
|
||||||
+Release: 30.vitastor%{?dist}.6
|
+Release: 32.vitastor%{?dist}.6
|
||||||
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
|
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
|
||||||
Epoch: 15
|
Epoch: 15
|
||||||
License: GPLv2 and GPLv2+ and CC-BY
|
License: GPLv2 and GPLv2+ and CC-BY
|
||||||
@@ -99,8 +99,8 @@ Source30: kvm-s390x.conf
|
@@ -99,9 +100,10 @@ Source30: kvm-s390x.conf
|
||||||
Source31: kvm-x86.conf
|
Source31: kvm-x86.conf
|
||||||
Source32: qemu-pr-helper.service
|
Source32: qemu-pr-helper.service
|
||||||
Source33: qemu-pr-helper.socket
|
Source33: qemu-pr-helper.socket
|
||||||
|
@ -36,9 +35,11 @@
|
||||||
+#Source34: 81-kvm-rhel.rules
|
+#Source34: 81-kvm-rhel.rules
|
||||||
+#Source35: udev-kvm-check.c
|
+#Source35: udev-kvm-check.c
|
||||||
Source36: README.tests
|
Source36: README.tests
|
||||||
|
+Source37: qemu-vitastor.c
|
||||||
|
|
||||||
|
|
||||||
@@ -825,7 +825,9 @@ Patch331: kvm-Drop-bogus-IPv6-messages.p
|
Patch0005: 0005-Initial-redhat-build.patch
|
||||||
|
@@ -825,7 +827,9 @@ Patch331: kvm-Drop-bogus-IPv6-messages.p
|
||||||
Patch333: kvm-virtiofsd-Whitelist-fchmod.patch
|
Patch333: kvm-virtiofsd-Whitelist-fchmod.patch
|
||||||
# For bz#1883869 - virtiofsd core dump in KATA Container [rhel-8.2.1.z]
|
# For bz#1883869 - virtiofsd core dump in KATA Container [rhel-8.2.1.z]
|
||||||
Patch334: kvm-virtiofsd-avoid-proc-self-fd-tempdir.patch
|
Patch334: kvm-virtiofsd-avoid-proc-self-fd-tempdir.patch
|
||||||
|
@ -49,7 +50,7 @@
|
||||||
|
|
||||||
BuildRequires: wget
|
BuildRequires: wget
|
||||||
BuildRequires: rpm-build
|
BuildRequires: rpm-build
|
||||||
@@ -842,7 +844,8 @@ BuildRequires: pciutils-devel
|
@@ -842,7 +846,8 @@ BuildRequires: pciutils-devel
|
||||||
BuildRequires: libiscsi-devel
|
BuildRequires: libiscsi-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
%if %{have_usbredir}
|
%if %{have_usbredir}
|
||||||
BuildRequires: usbredir-devel >= 0.7.1
|
BuildRequires: usbredir-devel >= 0.7.1
|
||||||
%endif
|
%endif
|
||||||
@@ -856,12 +859,12 @@ BuildRequires: virglrenderer-devel
|
@@ -856,12 +861,13 @@ BuildRequires: virglrenderer-devel
|
||||||
# For smartcard NSS support
|
# For smartcard NSS support
|
||||||
BuildRequires: nss-devel
|
BuildRequires: nss-devel
|
||||||
%endif
|
%endif
|
||||||
|
@ -70,12 +71,13 @@
|
||||||
BuildRequires: libssh-devel
|
BuildRequires: libssh-devel
|
||||||
-BuildRequires: librados-devel
|
-BuildRequires: librados-devel
|
||||||
-BuildRequires: librbd-devel
|
-BuildRequires: librbd-devel
|
||||||
+#BuildRequires: librados-devel
|
+BuildRequires: librados2-devel
|
||||||
+#BuildRequires: librbd-devel
|
+BuildRequires: librbd1-devel
|
||||||
|
+BuildRequires: vitastor-client-devel
|
||||||
%if %{have_gluster}
|
%if %{have_gluster}
|
||||||
# For gluster block driver
|
# For gluster block driver
|
||||||
BuildRequires: glusterfs-api-devel
|
BuildRequires: glusterfs-api-devel
|
||||||
@@ -955,25 +958,25 @@ hardware for a full system such as a PC
|
@@ -955,25 +961,25 @@ hardware for a full system such as a PC
|
||||||
|
|
||||||
%package -n qemu-kvm-core
|
%package -n qemu-kvm-core
|
||||||
Summary: qemu-kvm core components
|
Summary: qemu-kvm core components
|
||||||
|
@ -105,38 +107,35 @@
|
||||||
# For compressed guest memory dumps
|
# For compressed guest memory dumps
|
||||||
Requires: lzo snappy
|
Requires: lzo snappy
|
||||||
%if %{have_kvm_setup}
|
%if %{have_kvm_setup}
|
||||||
@@ -1085,15 +1088,15 @@ This package provides the additional iSC
|
@@ -1096,6 +1102,14 @@ Install this package if you want to acce
|
||||||
Install this package if you want to access iSCSI volumes.
|
using the rbd protocol.
|
||||||
|
|
||||||
|
|
||||||
-%package block-rbd
|
|
||||||
-Summary: QEMU Ceph/RBD block driver
|
|
||||||
-Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
|
||||||
-
|
|
||||||
-%description block-rbd
|
|
||||||
-This package provides the additional Ceph/RBD block driver for QEMU.
|
|
||||||
-
|
|
||||||
-Install this package if you want to access remote Ceph volumes
|
|
||||||
-using the rbd protocol.
|
|
||||||
+#%package block-rbd
|
|
||||||
+#Summary: QEMU Ceph/RBD block driver
|
|
||||||
+#Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
|
||||||
+#
|
|
||||||
+#%description block-rbd
|
|
||||||
+#This package provides the additional Ceph/RBD block driver for QEMU.
|
|
||||||
+#
|
|
||||||
+#Install this package if you want to access remote Ceph volumes
|
|
||||||
+#using the rbd protocol.
|
|
||||||
|
|
||||||
|
|
||||||
|
+%package block-vitastor
|
||||||
|
+Summary: QEMU Vitastor block driver
|
||||||
|
+Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
+
|
||||||
|
+%description block-vitastor
|
||||||
|
+This package provides the additional Vitastor block driver for QEMU.
|
||||||
|
+
|
||||||
|
+
|
||||||
%package block-ssh
|
%package block-ssh
|
||||||
@@ -1117,12 +1120,14 @@ the Secure Shell (SSH) protocol.
|
Summary: QEMU SSH block driver
|
||||||
|
Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
@@ -1110,6 +1124,7 @@ the Secure Shell (SSH) protocol.
|
||||||
|
%prep
|
||||||
|
%setup -n qemu-%{version}
|
||||||
|
%autopatch -p1
|
||||||
|
+cp %{SOURCE37} ./block/vitastor.c
|
||||||
|
|
||||||
|
%build
|
||||||
|
%global buildarch %{kvm_target}-softmmu
|
||||||
|
@@ -1117,12 +1132,13 @@ the Secure Shell (SSH) protocol.
|
||||||
# --build-id option is used for giving info to the debug packages.
|
# --build-id option is used for giving info to the debug packages.
|
||||||
buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
|
|
||||||
-%global block_drivers_list qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle
|
-%global block_drivers_list qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle
|
||||||
+#%global block_drivers_list qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle
|
+%global block_drivers_list qcow2,raw,file,host_device,nbd,iscsi,rbd,vitastor,blkdebug,luks,null-co,nvme,copy-on-read,throttle
|
||||||
+%global block_drivers_list qcow2,raw,file,host_device,nbd,iscsi,blkdebug,luks,null-co,nvme,copy-on-read,throttle
|
|
||||||
|
|
||||||
%if 0%{have_gluster}
|
%if 0%{have_gluster}
|
||||||
%global block_drivers_list %{block_drivers_list},gluster
|
%global block_drivers_list %{block_drivers_list},gluster
|
||||||
|
@ -146,12 +145,20 @@
|
||||||
./configure \
|
./configure \
|
||||||
--prefix="%{_prefix}" \
|
--prefix="%{_prefix}" \
|
||||||
--libdir="%{_libdir}" \
|
--libdir="%{_libdir}" \
|
||||||
@@ -1152,15 +1157,15 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
@@ -1132,7 +1148,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
%else
|
--docdir="%{qemudocdir}" \
|
||||||
|
--libexecdir="%{_libexecdir}" \
|
||||||
|
--extra-ldflags="-Wl,--build-id -Wl,-z,relro -Wl,-z,now" \
|
||||||
|
- --extra-cflags="%{optflags}" \
|
||||||
|
+ --extra-cflags="%{optflags} -DRHEL_BDRV_CO_TRUNCATE_FLAGS" \
|
||||||
|
--with-pkgversion="%{name}-%{version}-%{release}" \
|
||||||
|
--with-confsuffix=/"%{name}" \
|
||||||
|
--firmwarepath=%{_prefix}/share/qemu-firmware \
|
||||||
|
@@ -1153,14 +1169,15 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
--disable-numa \
|
--disable-numa \
|
||||||
%endif
|
%endif
|
||||||
- --enable-rbd \
|
--enable-rbd \
|
||||||
+ --disable-rbd \
|
+ --enable-vitastor \
|
||||||
%if 0%{have_librdma}
|
%if 0%{have_librdma}
|
||||||
--enable-rdma \
|
--enable-rdma \
|
||||||
%else
|
%else
|
||||||
|
@ -165,7 +172,7 @@
|
||||||
--enable-spice \
|
--enable-spice \
|
||||||
--enable-smartcard \
|
--enable-smartcard \
|
||||||
--enable-virglrenderer \
|
--enable-virglrenderer \
|
||||||
@@ -1179,7 +1184,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
@@ -1179,7 +1196,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
%else
|
%else
|
||||||
--disable-usb-redir \
|
--disable-usb-redir \
|
||||||
%endif
|
%endif
|
||||||
|
@ -174,7 +181,7 @@
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
--enable-libpmem \
|
--enable-libpmem \
|
||||||
%else
|
%else
|
||||||
@@ -1193,9 +1198,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
@@ -1193,9 +1210,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
%endif
|
%endif
|
||||||
--python=%{__python3} \
|
--python=%{__python3} \
|
||||||
--target-list="%{buildarch}" \
|
--target-list="%{buildarch}" \
|
||||||
|
@ -184,7 +191,7 @@
|
||||||
--with-coroutine=ucontext \
|
--with-coroutine=ucontext \
|
||||||
--tls-priority=NORMAL \
|
--tls-priority=NORMAL \
|
||||||
--disable-bluez \
|
--disable-bluez \
|
||||||
@@ -1262,7 +1265,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
@@ -1262,7 +1277,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
--disable-sanitizers \
|
--disable-sanitizers \
|
||||||
--disable-hvf \
|
--disable-hvf \
|
||||||
--disable-whpx \
|
--disable-whpx \
|
||||||
|
@ -193,7 +200,7 @@
|
||||||
--disable-membarrier \
|
--disable-membarrier \
|
||||||
--disable-vhost-crypto \
|
--disable-vhost-crypto \
|
||||||
--disable-libxml2 \
|
--disable-libxml2 \
|
||||||
@@ -1308,7 +1311,7 @@ make V=1 %{?_smp_mflags} $buildldflags
|
@@ -1308,7 +1323,7 @@ make V=1 %{?_smp_mflags} $buildldflags
|
||||||
cp -a %{kvm_target}-softmmu/qemu-system-%{kvm_target} qemu-kvm
|
cp -a %{kvm_target}-softmmu/qemu-system-%{kvm_target} qemu-kvm
|
||||||
|
|
||||||
gcc %{SOURCE6} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o ksmctl
|
gcc %{SOURCE6} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o ksmctl
|
||||||
|
@ -202,7 +209,7 @@
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||||
@@ -1343,8 +1346,8 @@ mkdir -p $RPM_BUILD_ROOT%{testsdir}/test
|
@@ -1343,8 +1358,8 @@ mkdir -p $RPM_BUILD_ROOT%{testsdir}/test
|
||||||
mkdir -p $RPM_BUILD_ROOT%{testsdir}/tests/qemu-iotests
|
mkdir -p $RPM_BUILD_ROOT%{testsdir}/tests/qemu-iotests
|
||||||
mkdir -p $RPM_BUILD_ROOT%{testsdir}/scripts/qmp
|
mkdir -p $RPM_BUILD_ROOT%{testsdir}/scripts/qmp
|
||||||
|
|
||||||
|
@ -213,7 +220,7 @@
|
||||||
|
|
||||||
install -m 0644 scripts/dump-guest-memory.py \
|
install -m 0644 scripts/dump-guest-memory.py \
|
||||||
$RPM_BUILD_ROOT%{_datadir}/%{name}
|
$RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||||
@@ -1562,6 +1565,8 @@ rm -rf $RPM_BUILD_ROOT%{qemudocdir}/inte
|
@@ -1562,6 +1577,8 @@ rm -rf $RPM_BUILD_ROOT%{qemudocdir}/inte
|
||||||
# Remove spec
|
# Remove spec
|
||||||
rm -rf $RPM_BUILD_ROOT%{qemudocdir}/specs
|
rm -rf $RPM_BUILD_ROOT%{qemudocdir}/specs
|
||||||
|
|
||||||
|
@ -222,7 +229,7 @@
|
||||||
%check
|
%check
|
||||||
export DIFF=diff; make check V=1
|
export DIFF=diff; make check V=1
|
||||||
|
|
||||||
@@ -1645,8 +1650,8 @@ useradd -r -u 107 -g qemu -G kvm -d / -s
|
@@ -1645,8 +1662,8 @@ useradd -r -u 107 -g qemu -G kvm -d / -s
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/ksm
|
%config(noreplace) %{_sysconfdir}/sysconfig/ksm
|
||||||
%{_unitdir}/ksmtuned.service
|
%{_unitdir}/ksmtuned.service
|
||||||
%{_sbindir}/ksmtuned
|
%{_sbindir}/ksmtuned
|
||||||
|
@ -233,7 +240,7 @@
|
||||||
%ghost %{_sysconfdir}/kvm
|
%ghost %{_sysconfdir}/kvm
|
||||||
%config(noreplace) %{_sysconfdir}/ksmtuned.conf
|
%config(noreplace) %{_sysconfdir}/ksmtuned.conf
|
||||||
%dir %{_sysconfdir}/%{name}
|
%dir %{_sysconfdir}/%{name}
|
||||||
@@ -1711,8 +1716,8 @@ useradd -r -u 107 -g qemu -G kvm -d / -s
|
@@ -1711,8 +1728,8 @@ useradd -r -u 107 -g qemu -G kvm -d / -s
|
||||||
%{_libexecdir}/vhost-user-gpu
|
%{_libexecdir}/vhost-user-gpu
|
||||||
%{_datadir}/%{name}/vhost-user/50-qemu-gpu.json
|
%{_datadir}/%{name}/vhost-user/50-qemu-gpu.json
|
||||||
%endif
|
%endif
|
||||||
|
@ -244,14 +251,13 @@
|
||||||
|
|
||||||
%files -n qemu-img
|
%files -n qemu-img
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@@ -1748,8 +1753,8 @@ useradd -r -u 107 -g qemu -G kvm -d / -s
|
@@ -1751,6 +1768,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s
|
||||||
%files block-iscsi
|
%files block-rbd
|
||||||
%{_libdir}/qemu-kvm/block-iscsi.so
|
%{_libdir}/qemu-kvm/block-rbd.so
|
||||||
|
|
||||||
-%files block-rbd
|
|
||||||
-%{_libdir}/qemu-kvm/block-rbd.so
|
|
||||||
+#%files block-rbd
|
|
||||||
+#%{_libdir}/qemu-kvm/block-rbd.so
|
|
||||||
|
|
||||||
|
+%files block-vitastor
|
||||||
|
+%{_libdir}/qemu-kvm/block-vitastor.so
|
||||||
|
+
|
||||||
%files block-ssh
|
%files block-ssh
|
||||||
%{_libdir}/qemu-kvm/block-ssh.so
|
%{_libdir}/qemu-kvm/block-ssh.so
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
|
#include "qemu/main-loop.h"
|
||||||
#include "block/block_int.h"
|
#include "block/block_int.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qapi/qmp/qdict.h"
|
#include "qapi/qmp/qdict.h"
|
||||||
|
@ -344,7 +345,7 @@ static int coroutine_fn vitastor_co_truncate(BlockDriverState *bs, int64_t offse
|
||||||
bool exact,
|
bool exact,
|
||||||
#endif
|
#endif
|
||||||
PreallocMode prealloc,
|
PreallocMode prealloc,
|
||||||
#if QEMU_VERSION_MAJOR >= 5 && QEMU_VERSION_MINOR >= 1 || QEMU_VERSION_MAJOR > 5
|
#if QEMU_VERSION_MAJOR >= 5 && QEMU_VERSION_MINOR >= 1 || QEMU_VERSION_MAJOR > 5 || defined RHEL_BDRV_CO_TRUNCATE_FLAGS
|
||||||
BdrvRequestFlags flags,
|
BdrvRequestFlags flags,
|
||||||
#endif
|
#endif
|
||||||
Error **errp)
|
Error **errp)
|
||||||
|
@ -392,10 +393,10 @@ static int vitastor_refresh_limits(BlockDriverState *bs)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t vitastor_get_allocated_file_size(BlockDriverState *bs)
|
//static int64_t vitastor_get_allocated_file_size(BlockDriverState *bs)
|
||||||
{
|
//{
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
static void vitastor_co_init_task(BlockDriverState *bs, VitastorRPC *task)
|
static void vitastor_co_init_task(BlockDriverState *bs, VitastorRPC *task)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue