Statistics
| Branch: | Revision:

root / migration-unix.c @ 992aeb8e

History | View | Annotate | Download (2.7 kB)

# Date Author Comment
dd217b87 12/21/2012 12:09 am Juan Quintela

migration: make writes blocking

Move all the writes to the migration_thread, and make writings
blocking. Notice that are still using the iothread for everything
that we do.

Signed-off-by: Juan Quintela <>

557ec5a0 12/20/2012 11:48 pm Juan Quintela

migration: include qemu-file.h

They don't use/know anything about buffered-file.

Signed-off-by: Juan Quintela <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

caf71f86 12/19/2012 09:31 am Paolo Bonzini

migration: move include files to include/migration/

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

f8fe7964 12/19/2012 09:29 am Paolo Bonzini

janitor: do not include qemu-char everywhere

Touching char/char.h basically causes the whole of QEMU to
be rebuilt. Avoid this, it is usually unnecessary.

Signed-off-by: Paolo Bonzini <>

a6ef2909 11/02/2012 07:35 pm Paolo Bonzini

migration: clean up server sockets and handlers before invoking process_incoming_migration

A first step towards making a common "suffix" for all migration protocols,
and moving it to process_incoming_migration.

Reviewed-by: Orit Wasserman <>...

6c360136 11/02/2012 07:35 pm Paolo Bonzini

migration: xxx_close will only be called once

No need to test s->fd again, it is tested in the caller.

Reviewed-by: Orit Wasserman <>
Signed-off-by: Paolo Bonzini <>

ab52a824 11/02/2012 07:35 pm Paolo Bonzini

migration: close socket QEMUFile from socket_close

The common suffix now is process_incoming_migration+qemu_fclose.

Reviewed-by: Orit Wasserman <>
Signed-off-by: Paolo Bonzini <>

1c12e1f5 11/02/2012 07:35 pm Paolo Bonzini

migration: move qemu_fclose to process_incoming_migration

The common suffix is now just process_incoming_migration.

Reviewed-by: Orit Wasserman <>
Signed-off-by: Paolo Bonzini <>

342ab8d1 10/23/2012 02:54 pm Paolo Bonzini

migration: centralize call to migrate_fd_error()

The call to migrate_fd_error() was missing for non-socket backends, so
centralize it in qmp_migrate().

Before:

(qemu) migrate fd:ffff
migrate: An undefined error has occurred
(qemu) info migrate...
e08c95ce 10/23/2012 02:54 pm Paolo Bonzini

migration: use qemu-sockets to establish Unix sockets

This makes migration-unix.c again a cut-and-paste job from migration-tcp.c,
exactly as it was in the beginning. :)

Signed-off-by: Paolo Bonzini <>

f37afb5a 10/23/2012 02:54 pm Paolo Bonzini

migration (outgoing): add error propagation for all protocols

Error propagation is already there for socket backends. Add it to other
protocols, simplifying code that tests for errors that will never happen.
With all protocols understanding Error, the code can be simplified...

43eaae28 10/23/2012 02:54 pm Paolo Bonzini

migration (incoming): add error propagation to fd and exec protocols

And remove the superfluous integer return value.

Reviewed-by: Luiz Capitulino <>
Signed-off-by: Paolo Bonzini <>

6b620ca3 01/13/2012 06:55 pm Paolo Bonzini

prepare for future GPLv2+ relicensing

All files under GPLv2 will get GPLv2+ changes starting tomorrow.
event_notifier.c and exec-obsolete.h were only ever touched by Red Hat
employees and can be relicensed now.

Signed-off-by: Paolo Bonzini <>...

8160bfbc 12/12/2011 07:47 pm Eduardo Habkost

unix_close(): check for close() errors too (v2)

In case close() fails, we want to report the error back.

Changes v1 -> v2:
- Use braces on if statement to match coding style

Signed-off-by: Eduardo Habkost <>
Signed-off-by: Anthony Liguori <>

ee86c61f 10/20/2011 02:23 pm Juan Quintela

migration: make migration-{tcp,unix} consistent

Files are almost identical in functionality, just remove the
differences that make no sense.

Signed-off-by: Juan Quintela <>
Reviewed-by: Anthony Liguori <>

efab4718 10/20/2011 02:23 pm Juan Quintela

migration: Don't use callback on file defining it

Signed-off-by: Juan Quintela <>

8414ff3b 10/20/2011 02:23 pm Juan Quintela

migration: propagate error correctly

unix and tcp outgoing migration have error values, but didn't returned
it. Make them return the error. Notice that EINPROGRESS & EWOULDBLOCK
are not considered errors as call will be retry later.

Signed-off-by: Juan Quintela <>...

3f77fc55 10/20/2011 02:23 pm Juan Quintela

migration: Fold MigrationState into FdMigrationState

Signed-off-by: Juan Quintela <>
Reviewed-by: Anthony Liguori <>

22f00a44 10/20/2011 02:23 pm Juan Quintela

migration: Rename FdMigrationState MigrationState

Signed-off-by: Juan Quintela <>
Reviewed-by: Anthony Liguori <>

0edda1c4 10/20/2011 02:23 pm Juan Quintela

migration: Refactor MigrationState creation

Signed-off-by: Juan Quintela <>
Reviewed-by: Anthony Liguori <>

07af4452 10/20/2011 02:23 pm Juan Quintela

migration: move migrate_new to do_migrate

Once there, remove all parameters that don't need to be passed to
*start_outgoing_migration() functions

Signed-off-by: Juan Quintela <>
Reviewed-by: Anthony Liguori <>

7be4363a 10/20/2011 02:23 pm Juan Quintela

migration: Make *start_outgoing_migration return FdMigrationState

Signed-off-by: Juan Quintela <>
Reviewed-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

a08784dd 04/15/2011 09:25 pm Blue Swirl

Remove unused sysemu.h include directives

Remove unused sysemu.h include directives to speed up build
with the following patches.

Signed-off-by: Blue Swirl <>

e0efb993 03/20/2011 11:39 pm Stefan Weil

Fix conversions from pointer to int and vice versa

Here the int values fds0, sigfd, s, sock and fd are converted
to void pointers which are later converted back to an int value.

These conversions should always use intptr_t instead of unsigned long.

They are needed for environments where sizeof(long) != sizeof(void *)....

511c0231 06/22/2010 11:15 pm Juan Quintela

Factorize common migration incoming code

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

cfaf6d36 03/17/2010 06:16 pm Juan Quintela

migration: Clear fd also in error cases

Not clearing the fd and closing the file makes qemu spin using 100%CPU
after incoming migration error.

See for instance bug:
https://bugzilla.redhat.com/show_bug.cgi?id=518032

Signed-off-by: Juan Quintela <>...

af821177 03/17/2010 06:16 pm Juan Quintela

migration: unix migration should obey autostart are the other ones

This was the only incoming migration without autostart check

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d0f2c4c6 02/07/2010 01:03 am malc

Do not use dprintf

dprintf is already claimed by POSIX1, and on at least one system
is implemented as a macro

[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html

Signed-off-by: malc <>

2dd650e5 12/18/2009 07:26 pm Daniel P. Berrange

Avoid permanently disabled QEMU monitor when UNIX migration fails

If a UNIX migration command is attempt to a UNIX socket which does
not exist, then the monitor is suspended, but never resumed. This
prevents any further use of the monitor

  • migration-unix.c: Only call migrate_fd_monitor_suspend() once...
40ff6d7e 12/03/2009 07:45 pm Kevin Wolf

Don't leak file descriptors

We're leaking file descriptors to child processes. Set FD_CLOEXEC on file
descriptors that don't need to be passed to children to stop this misbehaviour.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

f327aa0c 12/03/2009 06:48 pm Jan Kiszka

live migration: Propagate output monitor to callback handler

In order to allow proper progress reporting to the monitor that
initiated the migration, forward the monitor reference through the
migration layer down to SaveLiveStateHandler.

Signed-off-by: Jan Kiszka <>...

c163b5ca 11/17/2009 04:49 pm lirans@il.ibm.com

Block live migration

This patch introduces block migration called during live migration. Block
are being copied to the destination in an async way. First the code will
transfer the whole disk and then transfer all dirty blocks accumulted during
the migration....

4951f65b 08/24/2009 04:01 pm Chris Lalancette

Migration via unix sockets.

Implement migration via unix sockets. While you can fake this using
exec and netcat, this involves forking another process and is
generally not very nice. By doing this directly in qemu, we can avoid
the copy through the external nc command. This is useful for...