mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
095c12a4a2
commit
755e8d7cb6
2 changed files with 11 additions and 5 deletions
|
@ -66,7 +66,8 @@ typedef struct {
|
|||
/* State for the incoming migration */
|
||||
struct MigrationIncomingState {
|
||||
QEMUFile *from_src_file;
|
||||
|
||||
/* Previously received RAM's RAMBlock pointer */
|
||||
RAMBlock *last_recv_block;
|
||||
/* A hook to allow cleanup at the end of incoming migration */
|
||||
void *transport_data;
|
||||
void (*transport_cleanup)(void *data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue