diff --git a/add-nocow-to-vol-xml.patch b/add-nocow-to-vol-xml.patch index acbc9ab..ccf7ee5 100644 --- a/add-nocow-to-vol-xml.patch +++ b/add-nocow-to-vol-xml.patch @@ -1,8 +1,18 @@ -Index: libvirt-1.2.3/docs/schemas/storagevol.rng +commit ccc0b45917fa76a77ff83f1ddfd30836c8c3805e +Author: Chunyan Liu +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 + +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 @@ @@ -14,11 +24,11 @@ Index: libvirt-1.2.3/docs/schemas/storagevol.rng -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 @@ -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; diff --git a/libvirt.spec b/libvirt.spec index 617f242..1d246d5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -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