mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
migration: Unify migration_cancel and migrate_fd_cancel
There's no need for two separate functions and this _fd_ is a historic artifact that makes little sense nowadays. Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20250213175927.19642-3-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
a47f0cfba8
commit
8444d09381
2 changed files with 8 additions and 12 deletions
|
@ -106,7 +106,6 @@ static GSList *migration_blockers[MIG_MODE__MAX];
|
|||
|
||||
static bool migration_object_check(MigrationState *ms, Error **errp);
|
||||
static bool migration_switchover_start(MigrationState *s, Error **errp);
|
||||
static void migrate_fd_cancel(MigrationState *s);
|
||||
static bool close_return_path_on_source(MigrationState *s);
|
||||
static void migration_completion_end(MigrationState *s);
|
||||
static void migrate_hup_delete(MigrationState *s);
|
||||
|
@ -342,14 +341,6 @@ void migration_bh_schedule(QEMUBHFunc *cb, void *opaque)
|
|||
qemu_bh_schedule(bh);
|
||||
}
|
||||
|
||||
void migration_cancel()
|
||||
{
|
||||
if (migrate_dirty_limit()) {
|
||||
qmp_cancel_vcpu_dirty_limit(false, -1, NULL);
|
||||
}
|
||||
migrate_fd_cancel(current_migration);
|
||||
}
|
||||
|
||||
void migration_shutdown(void)
|
||||
{
|
||||
/*
|
||||
|
@ -1555,12 +1546,17 @@ static void migrate_fd_error(MigrationState *s, const Error *error)
|
|||
migrate_set_error(s, error);
|
||||
}
|
||||
|
||||
static void migrate_fd_cancel(MigrationState *s)
|
||||
void migration_cancel(void)
|
||||
{
|
||||
MigrationState *s = migrate_get_current();
|
||||
int old_state ;
|
||||
bool setup = (s->state == MIGRATION_STATUS_SETUP);
|
||||
|
||||
trace_migrate_fd_cancel();
|
||||
trace_migration_cancel();
|
||||
|
||||
if (migrate_dirty_limit()) {
|
||||
qmp_cancel_vcpu_dirty_limit(false, -1, NULL);
|
||||
}
|
||||
|
||||
WITH_QEMU_LOCK_GUARD(&s->qemu_file_lock) {
|
||||
if (s->rp_state.from_dst_file) {
|
||||
|
|
|
@ -156,7 +156,7 @@ multifd_set_outgoing_channel(void *ioc, const char *ioctype, const char *hostnam
|
|||
migrate_set_state(const char *new_state) "new state %s"
|
||||
migrate_fd_cleanup(void) ""
|
||||
migrate_error(const char *error_desc) "error=%s"
|
||||
migrate_fd_cancel(void) ""
|
||||
migration_cancel(void) ""
|
||||
migrate_handle_rp_req_pages(const char *rbname, size_t start, size_t len) "in %s at 0x%zx len 0x%zx"
|
||||
migrate_pending_exact(uint64_t size, uint64_t pre, uint64_t post) "exact pending size %" PRIu64 " (pre = %" PRIu64 " post=%" PRIu64 ")"
|
||||
migrate_pending_estimate(uint64_t size, uint64_t pre, uint64_t post) "estimate pending size %" PRIu64 " (pre = %" PRIu64 " post=%" PRIu64 ")"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue