qemu: migration: Rename qemuMigrationBakeCookie to qemuMigrationCookieFormat

Use a more descriptive name and move the verb to the end so that the
functions conform with the naming policy.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-09-28 16:49:28 +02:00
parent b74fabe9f6
commit 6c8b68b312
3 changed files with 28 additions and 28 deletions

View File

@ -2267,10 +2267,10 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
priv->origname, priv, NULL, 0, 0)))
return NULL;
if (qemuMigrationBakeCookie(mig, driver, vm,
QEMU_MIGRATION_SOURCE,
cookieout, cookieoutlen,
cookieFlags) < 0)
if (qemuMigrationCookieFormat(mig, driver, vm,
QEMU_MIGRATION_SOURCE,
cookieout, cookieoutlen,
cookieFlags) < 0)
return NULL;
if (flags & VIR_MIGRATE_OFFLINE) {
@ -2768,9 +2768,9 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
goto stopjob;
done:
if (qemuMigrationBakeCookie(mig, driver, vm,
QEMU_MIGRATION_DESTINATION,
cookieout, cookieoutlen, cookieFlags) < 0) {
if (qemuMigrationCookieFormat(mig, driver, vm,
QEMU_MIGRATION_DESTINATION,
cookieout, cookieoutlen, cookieFlags) < 0) {
/* We could tear down the whole guest here, but
* cookie data is (so far) non-critical, so that
* seems a little harsh. We'll just warn for now.
@ -3927,9 +3927,9 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
QEMU_MIGRATION_COOKIE_STATS;
if (qemuMigrationCookieAddPersistent(mig, &persistDef) < 0 ||
qemuMigrationBakeCookie(mig, driver, vm,
QEMU_MIGRATION_SOURCE,
cookieout, cookieoutlen, cookieFlags) < 0) {
qemuMigrationCookieFormat(mig, driver, vm,
QEMU_MIGRATION_SOURCE,
cookieout, cookieoutlen, cookieFlags) < 0) {
VIR_WARN("Unable to encode migration cookie");
}
@ -5411,10 +5411,10 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver,
priv->job.completed->statsType = QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION;
}
if (qemuMigrationBakeCookie(mig, driver, vm,
QEMU_MIGRATION_DESTINATION,
cookieout, cookieoutlen,
QEMU_MIGRATION_COOKIE_STATS) < 0)
if (qemuMigrationCookieFormat(mig, driver, vm,
QEMU_MIGRATION_DESTINATION,
cookieout, cookieoutlen,
QEMU_MIGRATION_COOKIE_STATS) < 0)
VIR_WARN("Unable to encode migration cookie");
/* Remove completed stats for post-copy, everything but timing fields

View File

@ -1389,13 +1389,13 @@ qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,
int
qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
virQEMUDriverPtr driver,
virDomainObjPtr dom,
qemuMigrationParty party,
char **cookieout,
int *cookieoutlen,
unsigned int flags)
qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
virQEMUDriverPtr driver,
virDomainObjPtr dom,
qemuMigrationParty party,
char **cookieout,
int *cookieoutlen,
unsigned int flags)
{
qemuDomainObjPrivatePtr priv = dom->privateData;

View File

@ -152,13 +152,13 @@ struct _qemuMigrationCookie {
int
qemuMigrationBakeCookie(qemuMigrationCookiePtr mig,
virQEMUDriverPtr driver,
virDomainObjPtr dom,
qemuMigrationParty party,
char **cookieout,
int *cookieoutlen,
unsigned int flags);
qemuMigrationCookieFormat(qemuMigrationCookiePtr mig,
virQEMUDriverPtr driver,
virDomainObjPtr dom,
qemuMigrationParty party,
char **cookieout,
int *cookieoutlen,
unsigned int flags);
qemuMigrationCookiePtr
qemuMigrationEatCookie(virQEMUDriverPtr driver,