migration: Remember num of ramblocks to sync during recovery
commit1015ff5476ceed0ff76156c1b60e76f9d21db497
authorPeter Xu <peterx@redhat.com>
Wed, 4 Oct 2023 22:02:36 +0000 (4 18:02 -0400)
committerJuan Quintela <quintela@redhat.com>
Wed, 11 Oct 2023 09:17:05 +0000 (11 11:17 +0200)
tree52cfea94f6d2c7b34174b2475f588de4b1d01e15
parentf4b897f4854c579cedc4d5ebb6db16c03a1eaeb1
migration: Remember num of ramblocks to sync during recovery

Instead of only relying on the count of rp_sem, make the counter be part of
RAMState so it can be used in both threads to synchronize on the process.

rp_sem will be further reused in follow up patches, as a way to kick the
main thread, e.g., on recovery failures.

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-7-peterx@redhat.com>
migration/ram.c