From: Ashijeet Acharya <ashijeetacharya@gmail.com>
To: dgilbert@redhat.com
Cc: jsnow@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com,
kwolf@redhat.com, armbru@redhat.com, quintela@redhat.com,
mst@redhat.com, marcandre.lureau@redhat.com, groug@kaod.org,
aneesh.kumar@linux.vnet.ibm.com, peter.maydell@linaro.org,
qemu-devel@nongnu.org,
Ashijeet Acharya <ashijeetacharya@gmail.com>
Subject: [Qemu-devel] [PATCH v5 4/4] migration: Fail migration blocker for --only-migratable
Date: Thu, 12 Jan 2017 21:22:34 +0530 [thread overview]
Message-ID: <1484236354-9640-5-git-send-email-ashijeetacharya@gmail.com> (raw)
In-Reply-To: <1484236354-9640-1-git-send-email-ashijeetacharya@gmail.com>
migrate_add_blocker should rightly fail if the '--only-migratable'
option was specified and the device in use should not be able to
perform the action which results in an unmigratable VM.
Make migrate_add_blocker return -EACCES in this case.
Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com>
---
migration/migration.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index cca820e..054048d 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1113,6 +1113,14 @@ static GSList *migration_blockers;
int migrate_add_blocker(Error *reason, Error **errp)
{
+ if (only_migratable) {
+ error_propagate(errp, reason);
+ error_prepend(errp, "disallowing migration blocker "
+ "(--only_migratable) for: ");
+ error_free(reason);
+ return -EACCES;
+ }
+
if (migration_is_idle(NULL)) {
migration_blockers = g_slist_prepend(migration_blockers, reason);
return 0;
--
2.6.2
next prev parent reply other threads:[~2017-01-12 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 15:52 [Qemu-devel] [PATCH v5 0/4] Introduce a new --only-migratable option Ashijeet Acharya
2017-01-12 15:52 ` [Qemu-devel] [PATCH v5 1/4] migration: Add a new option to enable only-migratable Ashijeet Acharya
2017-01-12 15:52 ` [Qemu-devel] [PATCH v5 2/4] migration: Allow "device add" options to only add migratable devices Ashijeet Acharya
2017-01-12 15:52 ` [Qemu-devel] [PATCH v5 3/4] migration: disallow migrate_add_blocker during migration Ashijeet Acharya
2017-01-15 19:47 ` Greg Kurz
2017-01-16 8:28 ` Ashijeet Acharya
2017-01-12 15:52 ` Ashijeet Acharya [this message]
2017-01-12 16:05 ` [Qemu-devel] [PATCH v5 0/4] Introduce a new --only-migratable option no-reply
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=1484236354-9640-5-git-send-email-ashijeetacharya@gmail.com \
--to=ashijeetacharya@gmail.com \
--cc=amit.shah@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=groug@kaod.org \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).