migration: refactor migration_completion
commitd7f5a04320187b94664539fc3aa9a87c9381a025
authorWei Wang <wei.w.wang@intel.com>
Fri, 4 Aug 2023 09:30:53 +0000 (4 17:30 +0800)
committerJuan Quintela <quintela@redhat.com>
Tue, 17 Oct 2023 07:14:32 +0000 (17 09:14 +0200)
tree4b52b7fd841da00028cc417665b464805c91e6b4
parent800485762e6564e04e2ab315132d477069562d91
migration: refactor migration_completion

Current migration_completion function is a bit long. Refactor the long
implementation into different subfunctions:
- migration_completion_precopy: completion code related to precopy
- migration_completion_postcopy: completion code related to postcopy

Rename await_return_path_close_on_source to
close_return_path_on_source: It is renamed to match with
open_return_path_on_source.

This improves readability and is easier for future updates (e.g. add new
subfunctions when completion code related to new features are needed). No
functional changes intended.

Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20230804093053.5037-1-wei.w.wang@intel.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/migration.c