From: Wei Yang <richardw.yang@linux.intel.com>
To: qemu-devel@nongnu.org
Cc: Wei Yang <richardw.yang@linux.intel.com>,
dgilbert@redhat.com, quintela@redhat.com
Subject: [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE
Date: Fri, 19 Jul 2019 15:11:29 +0800 [thread overview]
Message-ID: <20190719071129.11880-1-richardw.yang@linux.intel.com> (raw)
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
next reply other threads:[~2019-07-19 7:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 7:11 Wei Yang [this message]
2019-07-19 18:32 ` [Qemu-devel] [PATCH] migration: use migration_in_postcopy() to check POSTCOPY_ACTIVE Dr. David Alan Gilbert
2019-08-07 17:36 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190719071129.11880-1-richardw.yang@linux.intel.com \
--to=richardw.yang@linux.intel.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).