mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
qemu: blockjob: Transfer 'readonly' state of images after active layer block commit
When commiting a different image becomes the disk source. Since we store the readonly flag per-image we must update it to the same state the original image had. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f46eb511a2
commit
b036834eae
@ -1106,6 +1106,7 @@ qemuBlockJobProcessEventCompletedActiveCommit(virQEMUDriverPtr driver,
|
|||||||
cfgbase = cfgbaseparent->backingStore;
|
cfgbase = cfgbaseparent->backingStore;
|
||||||
cfgbaseparent->backingStore = NULL;
|
cfgbaseparent->backingStore = NULL;
|
||||||
cfgdisk->src = cfgbase;
|
cfgdisk->src = cfgbase;
|
||||||
|
cfgdisk->src->readonly = cfgtop->readonly;
|
||||||
virObjectUnref(cfgtop);
|
virObjectUnref(cfgtop);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1115,6 +1116,7 @@ qemuBlockJobProcessEventCompletedActiveCommit(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
baseparent->backingStore = NULL;
|
baseparent->backingStore = NULL;
|
||||||
job->disk->src = job->data.commit.base;
|
job->disk->src = job->data.commit.base;
|
||||||
|
job->disk->src->readonly = job->data.commit.top->readonly;
|
||||||
|
|
||||||
qemuBlockJobEventProcessConcludedRemoveChain(driver, vm, asyncJob, job->data.commit.top);
|
qemuBlockJobEventProcessConcludedRemoveChain(driver, vm, asyncJob, job->data.commit.top);
|
||||||
virObjectUnref(job->data.commit.top);
|
virObjectUnref(job->data.commit.top);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user