[libvirt] [PATCH 00/12] qemu: Refactor image permission/lock setting (blockdev-add saga)

Peter Krempa pkrempa at redhat.com
Wed Apr 24 07:59:11 UTC 2019


On Thu, Apr 18, 2019 at 14:30:04 -0500, Eric Blake wrote:
> On 4/18/19 9:42 AM, Peter Krempa wrote:
> > With new blockjob handling we'll need to modify permissions for chains
> > and individual images. The individual image code was universally
> > accessible but the chain setting code reimplemented it mostly only in
> > qemu_hotplug.h.
> > 
> > Refactor the handling by moving the code to qemu_domain.c and making it
> > universal.
> 
> Oh fun - competes with my work to get incremental backup in. But from
> the subject lines alone, it seems reasonable; I can see how hard it is
> to rebase my code on top of yours.

These are the necessary changes which are needed in:

backup: Wire up qemu full pull backup commands over QMP

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c9f1996b2a..d3307bfc4f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17796,7 +17796,7 @@ qemuDomainBackupDiskCleanup(virQEMUDriverPtr driver, virDomainObjPtr vm,
         ret = -1;
     }
     if (disk->state >= VIR_DOMAIN_BACKUP_DISK_STATE_LABEL)
-        qemuDomainDiskChainElementRevoke(driver, vm, disk->store);
+        qemuDomainStorageSourceAccessRevoke(driver, vm, disk->store);
     if ((!push || !completed) &&
         disk->state >= VIR_DOMAIN_BACKUP_DISK_STATE_CREATED &&
         disk->store->detected && unlink(disk->store->path) < 0) {
@@ -17997,8 +17997,8 @@ qemuDomainBackupBegin(virDomainPtr domain, const char *diskXml,
             }
             disk->state = VIR_DOMAIN_BACKUP_DISK_STATE_CREATED;
         }
-        if (qemuDomainDiskChainElementPrepare(driver, vm, disk->store, false,
-                                              true) < 0)
+        if (qemuDomainStorageSourceAccessAllow(driver, vm, disk->store, false,
+                                               true) < 0)
             goto endmon;
         disk->state = VIR_DOMAIN_BACKUP_DISK_STATE_LABEL;
         if (disk->store->detected) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190424/5df41325/attachment-0001.sig>


More information about the libvir-list mailing list