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) {