migration: Introduce migrate_has_error()
commit2b2f6f411efa83c70409fa6de2e61ec28221c757
authorPeter Xu <peterx@redhat.com>
Wed, 4 Oct 2023 22:02:32 +0000 (4 18:02 -0400)
committerJuan Quintela <quintela@redhat.com>
Wed, 11 Oct 2023 09:17:05 +0000 (11 11:17 +0200)
tree5757612585a791b693ed3d66cff0e926fb1bd3c7
parentc94143e587875bd70c280d72b1b70d9eefaf6854
migration: Introduce migrate_has_error()

Introduce a helper to detect whether MigrationState.error is set for
whatever reason.

This is preparation work for any thread (e.g. source return path thread) to
setup errors in an unified way to MigrationState, rather than relying on
its own way to set errors (mark_source_rp_bad()).

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231004220240.167175-3-peterx@redhat.com>
migration/migration.c
migration/migration.h