mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE
Use common helper function to check the state. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Message-Id: <20190719071129.11880-1-richardw.yang@linux.intel.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
52aec70923
commit
6a88eb2b08
1 changed files with 3 additions and 3 deletions
|
@ -3140,7 +3140,7 @@ static size_t qemu_rdma_save_page(QEMUFile *f, void *opaque,
|
|||
|
||||
CHECK_ERROR_STATE();
|
||||
|
||||
if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
|
||||
if (migration_in_postcopy()) {
|
||||
rcu_read_unlock();
|
||||
return RAM_SAVE_CONTROL_NOT_SUPP;
|
||||
}
|
||||
|
@ -3775,7 +3775,7 @@ static int qemu_rdma_registration_start(QEMUFile *f, void *opaque,
|
|||
|
||||
CHECK_ERROR_STATE();
|
||||
|
||||
if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
|
||||
if (migration_in_postcopy()) {
|
||||
rcu_read_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
@ -3810,7 +3810,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
|
|||
|
||||
CHECK_ERROR_STATE();
|
||||
|
||||
if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
|
||||
if (migration_in_postcopy()) {
|
||||
rcu_read_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue