migration: Rename MIG_EVENT_PRECOPY_* to MIG_EVENT_*

All three events are shared between precopy and postcopy, rather than
precopy specific.

For example, both precopy and postcopy will go through a SETUP process.

Meanwhile, both FAILED and DONE notifiers will be notified for either
precopy or postcopy on completions / failures.

Rename them to make them match what they do, and shorter.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260126213614.3815900-6-peterx@redhat.com
[fixed-up entry in scsi-disk.c that got merged first]
Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
Peter Xu
2026-01-26 16:36:14 -05:00
committed by Fabiano Rosas
parent 7da1fba27e
commit a545fafccf
11 changed files with 31 additions and 35 deletions

View File

@@ -378,9 +378,9 @@ static int vdpa_net_migration_state_notifier(NotifierWithReturn *notifier,
{
VhostVDPAState *s = container_of(notifier, VhostVDPAState, migration_state);
if (e->type == MIG_EVENT_PRECOPY_SETUP) {
if (e->type == MIG_EVENT_SETUP) {
vhost_vdpa_net_log_global_enable(s, true);
} else if (e->type == MIG_EVENT_PRECOPY_FAILED) {
} else if (e->type == MIG_EVENT_FAILED) {
vhost_vdpa_net_log_global_enable(s, false);
}
return 0;