mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
qemu: Remove legacy block job event processing handler
Previous patches removed the job submission for the handler so now even the handler itself can be removed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
cea7bc58b7
commit
7e405d9f5c
@ -11029,7 +11029,6 @@ qemuProcessEventFree(struct qemuProcessEvent *event)
|
||||
case QEMU_PROCESS_EVENT_DEVICE_DELETED:
|
||||
case QEMU_PROCESS_EVENT_NIC_RX_FILTER_CHANGED:
|
||||
case QEMU_PROCESS_EVENT_SERIAL_CHANGED:
|
||||
case QEMU_PROCESS_EVENT_BLOCK_JOB:
|
||||
case QEMU_PROCESS_EVENT_MONITOR_EOF:
|
||||
case QEMU_PROCESS_EVENT_GUEST_CRASHLOADED:
|
||||
g_free(event->data);
|
||||
|
@ -418,7 +418,6 @@ typedef enum {
|
||||
QEMU_PROCESS_EVENT_DEVICE_DELETED,
|
||||
QEMU_PROCESS_EVENT_NIC_RX_FILTER_CHANGED,
|
||||
QEMU_PROCESS_EVENT_SERIAL_CHANGED,
|
||||
QEMU_PROCESS_EVENT_BLOCK_JOB,
|
||||
QEMU_PROCESS_EVENT_JOB_STATUS_CHANGE,
|
||||
QEMU_PROCESS_EVENT_MONITOR_EOF,
|
||||
QEMU_PROCESS_EVENT_PR_DISCONNECT,
|
||||
|
@ -4015,44 +4015,6 @@ processSerialChangedEvent(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
processBlockJobEvent(virDomainObj *vm,
|
||||
const char *diskAlias,
|
||||
int type,
|
||||
int status)
|
||||
{
|
||||
virDomainDiskDef *disk;
|
||||
g_autoptr(qemuBlockJobData) job = NULL;
|
||||
|
||||
if (qemuDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
|
||||
return;
|
||||
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
VIR_DEBUG("Domain is not running");
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (!(disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, diskAlias, NULL))) {
|
||||
VIR_DEBUG("disk %s not found", diskAlias);
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (!(job = qemuBlockJobDiskGetJob(disk))) {
|
||||
VIR_DEBUG("creating new block job object for '%s'", diskAlias);
|
||||
if (!(job = qemuBlockJobDiskNew(vm, disk, type, diskAlias)))
|
||||
goto endjob;
|
||||
job->state = QEMU_BLOCKJOB_STATE_RUNNING;
|
||||
}
|
||||
|
||||
job->newstate = status;
|
||||
|
||||
qemuBlockJobUpdate(vm, job, VIR_ASYNC_JOB_NONE);
|
||||
|
||||
endjob:
|
||||
qemuDomainObjEndJob(vm);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
processJobStatusChangeEvent(virDomainObj *vm,
|
||||
qemuBlockJobData *job)
|
||||
@ -4261,11 +4223,6 @@ static void qemuProcessEventHandler(void *data, void *opaque)
|
||||
processSerialChangedEvent(driver, vm, processEvent->data,
|
||||
processEvent->action);
|
||||
break;
|
||||
case QEMU_PROCESS_EVENT_BLOCK_JOB:
|
||||
processBlockJobEvent(vm, processEvent->data,
|
||||
processEvent->action,
|
||||
processEvent->status);
|
||||
break;
|
||||
case QEMU_PROCESS_EVENT_JOB_STATUS_CHANGE:
|
||||
processJobStatusChangeEvent(vm, processEvent->data);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user