re-enable add-nocow-to-vol-xml.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=370
This commit is contained in:
James Fehlig 2014-05-07 16:21:44 +00:00 committed by Git OBS Bridge
parent 553e9bd059
commit 951275e87c
2 changed files with 39 additions and 29 deletions

View File

@ -1,8 +1,18 @@
Index: libvirt-1.2.3/docs/schemas/storagevol.rng
commit ccc0b45917fa76a77ff83f1ddfd30836c8c3805e
Author: Chunyan Liu <cyliu@suse.com>
Date: Wed May 7 12:45:40 2014 +0800
add nocow to vol xml
Updated patch. Rebase to git master.
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Index: libvirt-1.2.4/docs/schemas/storagevol.rng
===================================================================
--- libvirt-1.2.3.orig/docs/schemas/storagevol.rng
+++ libvirt-1.2.3/docs/schemas/storagevol.rng
@@ -139,6 +139,11 @@
--- libvirt-1.2.4.orig/docs/schemas/storagevol.rng
+++ libvirt-1.2.4/docs/schemas/storagevol.rng
@@ -138,6 +138,11 @@
<ref name='compat'/>
</optional>
<optional>
@ -14,11 +24,11 @@ Index: libvirt-1.2.3/docs/schemas/storagevol.rng
<ref name='fileFormatFeatures'/>
</optional>
</interleave>
Index: libvirt-1.2.3/src/conf/storage_conf.c
Index: libvirt-1.2.4/src/conf/storage_conf.c
===================================================================
--- libvirt-1.2.3.orig/src/conf/storage_conf.c
+++ libvirt-1.2.3/src/conf/storage_conf.c
@@ -1401,6 +1401,9 @@ virStorageVolDefParseXML(virStoragePoolD
--- libvirt-1.2.4.orig/src/conf/storage_conf.c
+++ libvirt-1.2.4/src/conf/storage_conf.c
@@ -1395,6 +1395,9 @@ virStorageVolDefParseXML(virStoragePoolD
virStringFreeList(version);
}
@ -28,22 +38,10 @@ Index: libvirt-1.2.3/src/conf/storage_conf.c
if (options->featureFromString && virXPathNode("./target/features", ctxt)) {
if ((n = virXPathNodeSet("./target/features/*", ctxt, &nodes)) < 0)
goto error;
Index: libvirt-1.2.3/src/conf/storage_conf.h
Index: libvirt-1.2.4/src/storage/storage_backend.c
===================================================================
--- libvirt-1.2.3.orig/src/conf/storage_conf.h
+++ libvirt-1.2.3/src/conf/storage_conf.h
@@ -90,6 +90,7 @@ struct _virStorageVolTarget {
virStorageEncryptionPtr encryption;
virBitmapPtr features;
char *compat;
+ bool nocow;
};
typedef struct _virStorageVolDef virStorageVolDef;
Index: libvirt-1.2.3/src/storage/storage_backend.c
===================================================================
--- libvirt-1.2.3.orig/src/storage/storage_backend.c
+++ libvirt-1.2.3/src/storage/storage_backend.c
--- libvirt-1.2.4.orig/src/storage/storage_backend.c
+++ libvirt-1.2.4/src/storage/storage_backend.c
@@ -37,6 +37,9 @@
#ifdef __linux__
# include <sys/ioctl.h>
@ -54,7 +52,7 @@ Index: libvirt-1.2.3/src/storage/storage_backend.c
#endif
#if WITH_SELINUX
@@ -449,6 +452,21 @@ virStorageBackendCreateRaw(virConnectPtr
@@ -452,6 +455,21 @@ virStorageBackendCreateRaw(virConnectPtr
goto cleanup;
}
@ -76,7 +74,7 @@ Index: libvirt-1.2.3/src/storage/storage_backend.c
if ((ret = createRawFile(fd, vol, inputvol)) < 0)
/* createRawFile already reported the exact error. */
ret = -1;
@@ -712,6 +730,7 @@ virStorageBackendCreateQemuImgOpts(char
@@ -717,6 +735,7 @@ virStorageBackendCreateQemuImgOpts(char
bool preallocate,
int format,
const char *compat,
@ -84,7 +82,7 @@ Index: libvirt-1.2.3/src/storage/storage_backend.c
virBitmapPtr features)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -724,6 +743,8 @@ virStorageBackendCreateQemuImgOpts(char
@@ -729,6 +748,8 @@ virStorageBackendCreateQemuImgOpts(char
virBufferAddLit(&buf, "encryption=on,");
if (preallocate)
virBufferAddLit(&buf, "preallocation=metadata,");
@ -93,7 +91,7 @@ Index: libvirt-1.2.3/src/storage/storage_backend.c
if (compat)
virBufferAsprintf(&buf, "compat=%s,", compat);
@@ -945,6 +966,7 @@ virStorageBackendCreateQemuImgCmd(virCon
@@ -950,6 +971,7 @@ virStorageBackendCreateQemuImgCmd(virCon
do_encryption, preallocate,
vol->target.format,
compat,
@ -101,3 +99,15 @@ Index: libvirt-1.2.3/src/storage/storage_backend.c
vol->target.features) < 0) {
virCommandFree(cmd);
return NULL;
Index: libvirt-1.2.4/src/util/virstoragefile.h
===================================================================
--- libvirt-1.2.4.orig/src/util/virstoragefile.h
+++ libvirt-1.2.4/src/util/virstoragefile.h
@@ -228,6 +228,7 @@ struct _virStorageSource {
int format; /* enum virStorageFileFormat */
virBitmapPtr features;
char *compat;
+ bool nocow;
virStoragePermsPtr perms;
virStorageTimestampsPtr timestamps;

View File

@ -436,7 +436,7 @@ Patch3: d6b27d3e-CVE-2014-0179.patch
Patch100: xen-name-for-devid.patch
Patch101: ia64-clone.patch
Patch102: xen-pv-cdrom.patch
#Patch103: add-nocow-to-vol-xml.patch
Patch103: add-nocow-to-vol-xml.patch
# pending review upstream patches
Patch150: libxl-migration-support.patch
# Our patches
@ -957,7 +957,7 @@ namespaces.
%patch100 -p1
%patch101 -p1
%patch102 -p1
#%patch103 -p1
%patch103 -p1
%patch150 -p1
%patch200 -p1
%patch201 -p1