mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu: blockjob: Unexport qemuBlockJobEventProcess
The function is now only called locally. Some code movement was necessary to avoid forward declarations. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c3ec4b8d6a
commit
359dc694f7
@ -70,45 +70,6 @@ qemuBlockJobEmitEvents(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* qemuBlockJobUpdate:
|
||||
* @vm: domain
|
||||
* @disk: domain disk
|
||||
* @error: error (output parameter)
|
||||
*
|
||||
* Update disk's mirror state in response to a block job event stored in
|
||||
* blockJobStatus by qemuProcessHandleBlockJob event handler.
|
||||
*
|
||||
* Returns the block job event processed or -1 if there was no pending event.
|
||||
*/
|
||||
int
|
||||
qemuBlockJobUpdate(virDomainObjPtr vm,
|
||||
qemuDomainAsyncJob asyncJob,
|
||||
virDomainDiskDefPtr disk,
|
||||
char **error)
|
||||
{
|
||||
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
int status = diskPriv->blockJobStatus;
|
||||
|
||||
if (error)
|
||||
*error = NULL;
|
||||
|
||||
if (status != -1) {
|
||||
qemuBlockJobEventProcess(priv->driver, vm, disk, asyncJob,
|
||||
diskPriv->blockJobType,
|
||||
diskPriv->blockJobStatus);
|
||||
diskPriv->blockJobStatus = -1;
|
||||
if (error)
|
||||
VIR_STEAL_PTR(*error, diskPriv->blockJobError);
|
||||
else
|
||||
VIR_FREE(diskPriv->blockJobError);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* qemuBlockJobEventProcess:
|
||||
* @driver: qemu driver
|
||||
@ -121,7 +82,7 @@ qemuBlockJobUpdate(virDomainObjPtr vm,
|
||||
* from QEMU. For mirror state's that must survive libvirt
|
||||
* restart, also update the domain's status XML.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
qemuBlockJobEventProcess(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk,
|
||||
@ -236,6 +197,45 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* qemuBlockJobUpdate:
|
||||
* @vm: domain
|
||||
* @disk: domain disk
|
||||
* @error: error (output parameter)
|
||||
*
|
||||
* Update disk's mirror state in response to a block job event stored in
|
||||
* blockJobStatus by qemuProcessHandleBlockJob event handler.
|
||||
*
|
||||
* Returns the block job event processed or -1 if there was no pending event.
|
||||
*/
|
||||
int
|
||||
qemuBlockJobUpdate(virDomainObjPtr vm,
|
||||
qemuDomainAsyncJob asyncJob,
|
||||
virDomainDiskDefPtr disk,
|
||||
char **error)
|
||||
{
|
||||
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
int status = diskPriv->blockJobStatus;
|
||||
|
||||
if (error)
|
||||
*error = NULL;
|
||||
|
||||
if (status != -1) {
|
||||
qemuBlockJobEventProcess(priv->driver, vm, disk, asyncJob,
|
||||
diskPriv->blockJobType,
|
||||
diskPriv->blockJobStatus);
|
||||
diskPriv->blockJobStatus = -1;
|
||||
if (error)
|
||||
VIR_STEAL_PTR(*error, diskPriv->blockJobError);
|
||||
else
|
||||
VIR_FREE(diskPriv->blockJobError);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* qemuBlockJobSyncBegin:
|
||||
* @disk: domain disk
|
||||
|
@ -30,12 +30,6 @@ int qemuBlockJobUpdate(virDomainObjPtr vm,
|
||||
qemuDomainAsyncJob asyncJob,
|
||||
virDomainDiskDefPtr disk,
|
||||
char **error);
|
||||
void qemuBlockJobEventProcess(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainDiskDefPtr disk,
|
||||
qemuDomainAsyncJob asyncJob,
|
||||
int type,
|
||||
int status);
|
||||
|
||||
void qemuBlockJobSyncBegin(virDomainDiskDefPtr disk);
|
||||
void qemuBlockJobSyncEnd(virDomainObjPtr vm,
|
||||
|
Loading…
Reference in New Issue
Block a user