提交 0d1622a1 编写于 作者: P Peter Krempa

qemu: snapshot: Rename external disk snapshot handling functions

Fix and unify the naming of external snapshot preparation functions.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 e1b61f2c
......@@ -15266,7 +15266,7 @@ typedef qemuDomainSnapshotDiskData *qemuDomainSnapshotDiskDataPtr;
static void
qemuDomainSnapshotDiskDataCleanup(qemuDomainSnapshotDiskDataPtr data,
qemuDomainSnapshotDiskCleanup(qemuDomainSnapshotDiskDataPtr data,
size_t ndata,
virQEMUDriverPtr driver,
virDomainObjPtr vm)
......@@ -15281,7 +15281,7 @@ qemuDomainSnapshotDiskDataCleanup(qemuDomainSnapshotDiskDataPtr data,
for (i = 0; i < ndata; i++) {
/* on success of the snapshot the 'src' and 'persistsrc' properties will
* be set to NULL by qemuDomainSnapshotUpdateDiskSources */
* be set to NULL by qemuDomainSnapshotDiskUpdateSource */
if (data[i].src) {
if (data[i].created &&
virStorageFileUnlink(data[i].src) < 0) {
......@@ -15307,7 +15307,7 @@ qemuDomainSnapshotDiskDataCleanup(qemuDomainSnapshotDiskDataPtr data,
static int
qemuDomainSnapshotDiskDataCollectOne(virQEMUDriverPtr driver,
qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDiskDefPtr disk,
virDomainSnapshotDiskDefPtr snapdisk,
......@@ -15366,13 +15366,13 @@ qemuDomainSnapshotDiskDataCollectOne(virQEMUDriverPtr driver,
/**
* qemuDomainSnapshotDiskDataCollect:
* qemuDomainSnapshotDiskPrepare:
*
* Collects and prepares a list of structures that hold information about disks
* that are selected for the snapshot.
*/
static int
qemuDomainSnapshotDiskDataCollect(virQEMUDriverPtr driver,
qemuDomainSnapshotDiskPrepare(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainMomentObjPtr snap,
bool reuse,
......@@ -15392,7 +15392,7 @@ qemuDomainSnapshotDiskDataCollect(virQEMUDriverPtr driver,
if (snapdef->disks[i].snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NONE)
continue;
if (qemuDomainSnapshotDiskDataCollectOne(driver, vm, vm->def->disks[i],
if (qemuDomainSnapshotDiskPrepareOne(driver, vm, vm->def->disks[i],
snapdef->disks + i,
data + ndata++, reuse) < 0)
goto cleanup;
......@@ -15403,13 +15403,13 @@ qemuDomainSnapshotDiskDataCollect(virQEMUDriverPtr driver,
ret = 0;
cleanup:
qemuDomainSnapshotDiskDataCleanup(data, ndata, driver, vm);
qemuDomainSnapshotDiskCleanup(data, ndata, driver, vm);
return ret;
}
static void
qemuDomainSnapshotUpdateDiskSourcesRenumber(virStorageSourcePtr src)
qemuDomainSnapshotDiskUpdateSourceRenumber(virStorageSourcePtr src)
{
virStorageSourcePtr next;
unsigned int idx = 1;
......@@ -15420,7 +15420,7 @@ qemuDomainSnapshotUpdateDiskSourcesRenumber(virStorageSourcePtr src)
/**
* qemuDomainSnapshotUpdateDiskSources:
* qemuDomainSnapshotDiskUpdateSource:
* @driver: QEMU driver
* @vm: domain object
* @dd: snapshot disk data object
......@@ -15428,7 +15428,7 @@ qemuDomainSnapshotUpdateDiskSourcesRenumber(virStorageSourcePtr src)
* Updates disk definition after a successful snapshot.
*/
static void
qemuDomainSnapshotUpdateDiskSources(virQEMUDriverPtr driver,
qemuDomainSnapshotDiskUpdateSource(virQEMUDriverPtr driver,
virDomainObjPtr vm,
qemuDomainSnapshotDiskDataPtr dd)
{
......@@ -15454,7 +15454,7 @@ qemuDomainSnapshotUpdateDiskSources(virQEMUDriverPtr driver,
VIR_STEAL_PTR(dd->disk->src, dd->src);
/* fix numbering of disks */
qemuDomainSnapshotUpdateDiskSourcesRenumber(dd->disk->src);
qemuDomainSnapshotDiskUpdateSourceRenumber(dd->disk->src);
if (dd->persistdisk) {
VIR_STEAL_PTR(dd->persistsrc->backingStore, dd->persistdisk->src);
......@@ -15519,7 +15519,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
/* prepare a list of objects to use in the vm definition so that we don't
* have to roll back later */
if (qemuDomainSnapshotDiskDataCollect(driver, vm, snap, reuse,
if (qemuDomainSnapshotDiskPrepare(driver, vm, snap, reuse,
&diskdata, &ndiskdata) < 0)
goto cleanup;
......@@ -15554,7 +15554,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
virDomainAuditDisk(vm, dd->disk->src, dd->src, "snapshot", rc >= 0);
if (rc == 0)
qemuDomainSnapshotUpdateDiskSources(driver, vm, dd);
qemuDomainSnapshotDiskUpdateSource(driver, vm, dd);
}
if (rc < 0)
......@@ -15568,7 +15568,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
ret = 0;
cleanup:
qemuDomainSnapshotDiskDataCleanup(diskdata, ndiskdata, driver, vm);
qemuDomainSnapshotDiskCleanup(diskdata, ndiskdata, driver, vm);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册