From: Joao Martins <joao.m.martins@oracle.com>
To: Jim Fehlig <jfehlig@suse.com>, libvir-list@redhat.com
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH v3 2/3] libxl: move begin phase job handling
Date: Tue, 2 Feb 2016 12:05:52 +0000 [thread overview]
Message-ID: <56B09BA0.8050809@oracle.com> (raw)
In-Reply-To: <56B00501.1060306@suse.com>
On 02/02/2016 01:23 AM, Jim Fehlig wrote:
> On 01/20/2016 12:00 PM, Joao Martins wrote:
>> . From libxlMigrationBegin to libxlDomainMigrateBegin3Params().
>> This is a preparatory patch to be able to begin a job in the
>> perform phase.
>>
>> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
>> ---
>> src/libxl/libxl_driver.c | 18 +++++++++++++++++-
>> src/libxl/libxl_migration.c | 16 +++-------------
>> 2 files changed, 20 insertions(+), 14 deletions(-)
>>
>> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
>> index d34f843..28220b2 100644
>> --- a/src/libxl/libxl_driver.c
>> +++ b/src/libxl/libxl_driver.c
>> @@ -5187,6 +5187,8 @@ libxlDomainMigrateBegin3Params(virDomainPtr domain,
>> {
>> const char *xmlin = NULL;
>> virDomainObjPtr vm = NULL;
>> + libxlDriverPrivatePtr driver;
>> + char *ret;
>>
>> #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
>> virReportUnsupportedError();
>> @@ -5223,7 +5225,21 @@ libxlDomainMigrateBegin3Params(virDomainPtr domain,
>> return NULL;
>> }
>>
>> - return libxlDomainMigrationBegin(domain->conn, vm, xmlin);
>> + driver = domain->conn->privateData;
>> + if (libxlDomainObjBeginJob(driver, vm, LIBXL_JOB_MODIFY) < 0) {
>> + virObjectUnlock(vm);
>> + return NULL;
>> + }
>> +
>> + ret = libxlDomainMigrationBegin(domain->conn, vm, xmlin);
>> +
>> + if (!libxlDomainObjEndJob(driver, vm))
>> + vm = NULL;
>
> IIRC the qemu driver handles this a bit differently, and probably more
> correctly. On the sender, a job is started during the begin phase and ended in
> the confirm phase. On the receiver, a job is started in the prepare phase and
> ended in the finish phase. This prevents modifying the virDomainObj between
> phases, e.g. the begin and perform phases on the sender. Is it possible to
> change the job handling similarly in the libxl migration phases?
>
Yeah, IIUC I believe this is the behavior depicted by
VIR_MIGRATE_CHANGE_PROTECTION flag in which is set by default if the driver
support it. So since we're going this way, we should adversite it too in
libxlConnectSupportsFeature() ?
Btw, the P2P patch keeps the original behavior wrt to jobs, and these two
patches meant solely for improving job handling in migration in general. What do
you think in making it a separate patch from this series? (with the changes
suggested above)
Joao
> Regards,
> Jim
>
next prev parent reply other threads:[~2016-02-02 12:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1453316408-30373-1-git-send-email-joao.m.martins@oracle.com>
2016-01-20 19:00 ` [PATCH v3 1/3] libxl: add p2p migration Joao Martins
2016-01-20 19:00 ` [PATCH v3 2/3] libxl: move begin phase job handling Joao Martins
2016-01-20 19:00 ` [PATCH v3 3/3] libxl: begin job on perform phase Joao Martins
[not found] ` <1453316408-30373-3-git-send-email-joao.m.martins@oracle.com>
2016-02-02 1:23 ` [PATCH v3 2/3] libxl: move begin phase job handling Jim Fehlig
[not found] ` <56B00501.1060306@suse.com>
2016-02-02 12:05 ` Joao Martins [this message]
2016-02-02 15:39 ` Jim Fehlig
[not found] ` <56B0CD98.5050102@suse.com>
2016-02-02 16:55 ` Joao Martins
[not found] ` <1453316408-30373-2-git-send-email-joao.m.martins@oracle.com>
2016-02-02 1:10 ` [PATCH v3 1/3] libxl: add p2p migration Jim Fehlig
2016-02-02 23:41 ` Jim Fehlig
[not found] ` <56B13EAD.9070406@suse.com>
2016-02-03 19:36 ` Joao Martins
[not found] ` <56B256C5.6050700@oracle.com>
2016-02-04 19:20 ` Jim Fehlig
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=56B09BA0.8050809@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=jfehlig@suse.com \
--cc=libvir-list@redhat.com \
--cc=xen-devel@lists.xen.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 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).