From: Juan Quintela <quintela@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Cc: liang.z.li@intel.com, qemu-devel@nongnu.org,
amit.shah@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/3] Add migrate -u option for -incoming pause
Date: Tue, 10 Feb 2015 18:00:16 +0100 [thread overview]
Message-ID: <87386ditwf.fsf@neno.neno> (raw)
In-Reply-To: <1423584999-13946-3-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Tue, 10 Feb 2015 16:16:38 +0000")
"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Once a qemu has been started with -incoming pause the
> migration can be started by issuing:
>
> migrate -u uri
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> - "(base image shared between src and destination)",
> + "(base image shared between src and destination)"
> + "\n\t\t\t -u unpauses an incoming migration started with "
> + "-incoming pause using the given uri.",
Spaces vs tabs.
> + -u to unpause an incoming migration started with -incoming pause
more spaces
> - qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, &err);
> + qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, !!unpause, unpause,
> + &err);
I don't claim to understand QMP, but this whole bussines of !!foo, foo
is getting confusing, no?
No, this is not relaced to this patch.
> {
> Error *local_err = NULL;
> MigrationState *s = migrate_get_current();
> @@ -450,6 +450,25 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
> return;
> }
>
I would preffer something like:
if (runstate_check(RUN_STATE_INMIGRATE)) {
if (unpause) {
... unpause code
}
} else {
error_setg(errp, "Guest is waiting for an incoming migration");
return;
}
if (unpause) {
error_setg(errp, "Guest is waiting for an incoming migration");
return;
}
if (s->state == MIG_STATE_ACTIVE || s->state == MIG_STATE_SETUP ||
s->state == MIG_STATE_CANCELLING) {
error_set(errp, QERR_MIGRATION_ACTIVE);
return;
}
if (qemu_savevm_state_blocked(errp)) {
return;
}
.... and now continue with the rest ...
Thinking more about this problem, I am not sure this is the "cleanest
approach". What do you think of:
- create RUN_STATE_INMIGRATE_PAUSED
bonus: no need of paused_incoming variable
- create a new migrate_incoming command
And then we have cleaner separation of what we are doing?
Later, Juan.
next prev parent reply other threads:[~2015-02-10 17:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 16:16 [Qemu-devel] [PATCH 0/3] -incoming pause Dr. David Alan Gilbert (git)
2015-02-10 16:16 ` [Qemu-devel] [PATCH 1/3] Add " Dr. David Alan Gilbert (git)
2015-02-10 16:42 ` Juan Quintela
2015-02-10 16:16 ` [Qemu-devel] [PATCH 2/3] Add migrate -u option for " Dr. David Alan Gilbert (git)
2015-02-10 16:47 ` Daniel P. Berrange
2015-02-10 16:57 ` Eric Blake
2015-02-11 16:48 ` Dr. David Alan Gilbert
2015-02-11 17:10 ` Eric Blake
2015-02-10 16:59 ` Dr. David Alan Gilbert
2015-02-10 17:00 ` Juan Quintela [this message]
2015-02-11 16:53 ` Dr. David Alan Gilbert
2015-02-10 16:16 ` [Qemu-devel] [PATCH 3/3] Document -incoming options Dr. David Alan Gilbert (git)
2015-02-10 17:00 ` Juan Quintela
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=87386ditwf.fsf@neno.neno \
--to=quintela@redhat.com \
--cc=amit.shah@redhat.com \
--cc=dgilbert@redhat.com \
--cc=liang.z.li@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.