Changeset
src/qemu/qemu_domain.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
Git apply log
Switched to a new branch 'fe62ca100939098eff2a758a251cebdb27f34c08.1520603416.git.pkrempa@redhat.com'
Applying: qemu: Add qemu functions for storage source private data handling
To https://github.com/patchew-project/libvirt
 * [new tag]             patchew/fe62ca100939098eff2a758a251cebdb27f34c08.1520603416.git.pkrempa@redhat.com -> patchew/fe62ca100939098eff2a758a251cebdb27f34c08.1520603416.git.pkrempa@redhat.com
Test passed: syntax-check

loading

[libvirt] [PATCH] qemu: Add qemu functions for storage source private data handling
Posted by Peter Krempa, 15 weeks ago
The qemu driver registered the helpers from util code, but it will be
necessary to format also some qemu-specific data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---

This patch conflicts with Michal's persistent reservations series. I'll
need the code in the place this patch places it later so I'm sending
this to avoid having to move this again very soon.

 src/qemu/qemu_domain.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index b55013de6a..9802dcdbc6 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1951,6 +1951,28 @@ qemuDomainObjPrivateFree(void *data)
 }


+static int
+qemuStorageSourcePrivateDataParse(xmlXPathContextPtr ctxt,
+                                  virStorageSourcePtr src)
+{
+    if (virStorageSourcePrivateDataParseRelPath(ctxt, src) < 0)
+        return -1;
+
+    return 0;
+}
+
+
+static int
+qemuStorageSourcePrivateDataFormat(virStorageSourcePtr src,
+                                   virBufferPtr buf)
+{
+    if (virStorageSourcePrivateDataFormatRelPath(src, buf) < 0)
+        return -1;
+
+    return 0;
+}
+
+
 static void
 qemuDomainObjPrivateXMLFormatVcpus(virBufferPtr buf,
                                    virDomainDefPtr def)
@@ -2538,8 +2560,8 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
     .chrSourceNew = qemuDomainChrSourcePrivateNew,
     .parse = qemuDomainObjPrivateXMLParse,
     .format = qemuDomainObjPrivateXMLFormat,
-    .storageParse = virStorageSourcePrivateDataParseRelPath,
-    .storageFormat = virStorageSourcePrivateDataFormatRelPath,
+    .storageParse = qemuStorageSourcePrivateDataParse,
+    .storageFormat = qemuStorageSourcePrivateDataFormat,
 };


-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Add qemu functions for storage source private data handling
Posted by Michal Privoznik, 14 weeks ago
On 03/09/2018 02:52 PM, Peter Krempa wrote:
> The qemu driver registered the helpers from util code, but it will be
> necessary to format also some qemu-specific data.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
> 
> This patch conflicts with Michal's persistent reservations series. I'll
> need the code in the place this patch places it later so I'm sending
> this to avoid having to move this again very soon.
> 
>  src/qemu/qemu_domain.c | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)

ACK

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list