diff mbox

[17/18] migration: add prefix for local migration to incoming migration

Message ID 1377069536-12658-19-git-send-email-lilei@linux.vnet.ibm.com
State New
Headers show

Commit Message

Lei Li Aug. 21, 2013, 7:18 a.m. UTC
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
 migration.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Paolo Bonzini Aug. 21, 2013, 10:52 a.m. UTC | #1
Il 21/08/2013 09:18, Lei Li ha scritto:
> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
> ---
>  migration.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/migration.c b/migration.c
> index 2471664..17cf2fd 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -81,6 +81,9 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
>          unix_start_incoming_migration(p, errp);
>      else if (strstart(uri, "fd:", &p))
>          fd_start_incoming_migration(p, errp);
> +    else if (strstart(uri, "local:", &p))
> +        local_start_incoming_migration(p, errp);
> +
>  #endif
>      else {
>          error_setg(errp, "unknown migration protocol: %s", uri);
> 

This should not be needed.  The destination can just use the normal
unix: protocol.  The load hook will only be called if the source uses
localhost migration, and it will get the pipe via SCM_RIGHTS then
process the pipe.

Paolo
Lei Li Aug. 23, 2013, 2:02 p.m. UTC | #2
On 08/21/2013 06:52 PM, Paolo Bonzini wrote:
> Il 21/08/2013 09:18, Lei Li ha scritto:
>> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
>> ---
>>   migration.c |    3 +++
>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/migration.c b/migration.c
>> index 2471664..17cf2fd 100644
>> --- a/migration.c
>> +++ b/migration.c
>> @@ -81,6 +81,9 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
>>           unix_start_incoming_migration(p, errp);
>>       else if (strstart(uri, "fd:", &p))
>>           fd_start_incoming_migration(p, errp);
>> +    else if (strstart(uri, "local:", &p))
>> +        local_start_incoming_migration(p, errp);
>> +
>>   #endif
>>       else {
>>           error_setg(errp, "unknown migration protocol: %s", uri);
>>
> This should not be needed.  The destination can just use the normal
> unix: protocol.  The load hook will only be called if the source uses
> localhost migration, and it will get the pipe via SCM_RIGHTS then
> process the pipe.

Acknowledge, thanks.

>
> Paolo
>
diff mbox

Patch

diff --git a/migration.c b/migration.c
index 2471664..17cf2fd 100644
--- a/migration.c
+++ b/migration.c
@@ -81,6 +81,9 @@  void qemu_start_incoming_migration(const char *uri, Error **errp)
         unix_start_incoming_migration(p, errp);
     else if (strstart(uri, "fd:", &p))
         fd_start_incoming_migration(p, errp);
+    else if (strstart(uri, "local:", &p))
+        local_start_incoming_migration(p, errp);
+
 #endif
     else {
         error_setg(errp, "unknown migration protocol: %s", uri);