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

View File

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

View File

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