提交 b036834e 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 f46eb511
......@@ -1106,6 +1106,7 @@ qemuBlockJobProcessEventCompletedActiveCommit(virQEMUDriverPtr driver,
cfgbase = cfgbaseparent->backingStore;
cfgbaseparent->backingStore = NULL;
cfgdisk->src = cfgbase;
cfgdisk->src->readonly = cfgtop->readonly;
virObjectUnref(cfgtop);
}
......@@ -1115,6 +1116,7 @@ qemuBlockJobProcessEventCompletedActiveCommit(virQEMUDriverPtr driver,
baseparent->backingStore = NULL;
job->disk->src = job->data.commit.base;
job->disk->src->readonly = job->data.commit.top->readonly;
qemuBlockJobEventProcessConcludedRemoveChain(driver, vm, asyncJob, job->data.commit.top);
virObjectUnref(job->data.commit.top);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册