mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
migration/multifd: Replace p->pages with an union pointer
We want multifd to be able to handle more types of data than just ram pages. To start decoupling multifd from pages, replace p->pages (MultiFDPages_t) with the new type MultiFDSendData that hides the client payload inside an union. The general idea here is to isolate functions that *need* to handle MultiFDPages_t and move them in the future to multifd-ram.c, while multifd.c will stay with only the core functions that handle MultiFDSendData/MultiFDRecvData. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
0e427da096
commit
9f0e108901
7 changed files with 57 additions and 47 deletions
|
@ -152,12 +152,7 @@ typedef struct {
|
|||
*/
|
||||
bool pending_job;
|
||||
bool pending_sync;
|
||||
/* array of pages to sent.
|
||||
* The owner of 'pages' depends of 'pending_job' value:
|
||||
* pending_job == 0 -> migration_thread can use it.
|
||||
* pending_job != 0 -> multifd_channel can use it.
|
||||
*/
|
||||
MultiFDPages_t *pages;
|
||||
MultiFDSendData *data;
|
||||
|
||||
/* thread local variables. No locking required */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue