migration: Move static var in ram_block_from_stream() into global
commit755e8d7cb6ce2ba62d282ffbb367de391fe0cc3d
authorPeter Xu <peterx@redhat.com>
Tue, 1 Mar 2022 08:39:07 +0000 (1 16:39 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 2 Mar 2022 18:20:45 +0000 (2 18:20 +0000)
tree809c5966410e9f698d1d55c74afb23deea3ac6a8
parent095c12a4a2df4bb45e8d1b1f74dc7ea80fef9ca4
migration: Move static var in ram_block_from_stream() into global

Static variable is very unfriendly to threading of ram_block_from_stream().
Move it into MigrationIncomingState.

Make the incoming state pointer to be passed over to ram_block_from_stream() on
both caller sites.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220301083925.33483-8-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.h
migration/ram.c