* [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE
@ 2019-07-19 7:11 Wei Yang
2019-07-19 18:32 ` Dr. David Alan Gilbert
2019-08-07 17:36 ` Dr. David Alan Gilbert
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yang @ 2019-07-19 7:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Wei Yang, dgilbert, quintela
Use common helper function to check the state.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
migration/rdma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 3036221ee8..0e73e759ca 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE
2019-07-19 7:11 [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE Wei Yang
@ 2019-07-19 18:32 ` Dr. David Alan Gilbert
2019-08-07 17:36 ` Dr. David Alan Gilbert
1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2019-07-19 18:32 UTC (permalink / raw)
To: Wei Yang; +Cc: qemu-devel, quintela
* Wei Yang (richardw.yang@linux.intel.com) wrote:
> Use common helper function to check the state.
>
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/rdma.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 3036221ee8..0e73e759ca 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -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;
> }
> --
> 2.17.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE
2019-07-19 7:11 [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE Wei Yang
2019-07-19 18:32 ` Dr. David Alan Gilbert
@ 2019-08-07 17:36 ` Dr. David Alan Gilbert
1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2019-08-07 17:36 UTC (permalink / raw)
To: Wei Yang; +Cc: qemu-devel, quintela
* Wei Yang (richardw.yang@linux.intel.com) wrote:
> Use common helper function to check the state.
>
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
queued
> ---
> migration/rdma.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 3036221ee8..0e73e759ca 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -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;
> }
> --
> 2.17.1
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-07 17:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 7:11 [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE Wei Yang
2019-07-19 18:32 ` Dr. David Alan Gilbert
2019-08-07 17:36 ` Dr. David Alan Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).