migration: Move the yank unregister of channel_close out
commit39675ffffb3394d44b880d083a214c5e44786170
authorPeter Xu <peterx@redhat.com>
Thu, 22 Jul 2021 17:58:41 +0000 (22 13:58 -0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 26 Jul 2021 11:45:03 +0000 (26 12:45 +0100)
treeac3be89aab3c71d61ad772e6c28f7fe523f43ff7
parentc6ad5be7ae5b8c6bbbd0c592bbf18d4a78540516
migration: Move the yank unregister of channel_close out

It's efficient, but hackish to call yank unregister calls in channel_close(),
especially it'll be hard to debug when qemu crashed with some yank function
leaked.

Remove that hack, but instead explicitly unregister yank functions at the
places where needed, they are:

  (on src)
  - migrate_fd_cleanup
  - postcopy_pause

  (on dst)
  - migration_incoming_state_destroy
  - postcopy_pause_incoming

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210722175841.938739-6-peterx@redhat.com>
Reviewed-by: Lukas Straub <lukasstraub2@web.de>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c
migration/qemu-file-channel.c
migration/savevm.c
migration/yank_functions.c
migration/yank_functions.h