History | View | Annotate | Download (6.1 kB)
migration: consolidate QEMUFile methods in a single QEMUFileOps struct
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration: add qemu_get_fd
buffered_file: unfold migrate_fd_wait_for_unfreeze
We only used it once, just remove the callback indirection.
Signed-off-by: Juan Quintela <quintela@redhat.com>
buffered_file: unfold migrate_fd_close
buffered_file: We can access directly to bandwidth_limit
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
buffered_file: callers of buffered_flush() already check for errors
buffered_file: make buffered_flush return the error code
Or the amount of data written if there is no error. Adjust all callers.
migration: make migrate_fd_wait_for_unfreeze() return errors
Adjust all callers
buffered_file: buffered_put_buffer() don't need to set last_error
Callers on savevm.c:qemu_fflush() will set it.
BufferedFile: append, then flush
Simplify the logic for pushing data from the buffer to the outputpipe/socket. This also matches more closely what will be theoperation of the migration thread.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>...
buffered_file: rename opaque to migration_state
buffered_file: opaque is MigrationState
It always have that type, just change it.We will remove buffered file later on the migration thread series.
buffered_file: unfold migrate_fd_put_buffer
We only used it once, just remove the callback indirection
buffered_file: unfold migrate_fd_put_ready
We only use it once, just remove the callback indirection.
buffered_file: g_realloc() can't fail
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Orit Wasserman <owasserm@redhat.com>
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 Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
migration: change has_error to contain errno values
We normally already have an errno value. When not, abuse EIO.
migration: rename qemu_file_has_error to qemu_file_get_error
Now the function returned errno, so it is better the new name.
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
migration: use qemu_file_get_error() return value when possible
migration: If there is one error, it makes no sense to continue
Once there, add a comment about what each error mean.
buffered_file: Use right "opaque"
buffered_close 's' variable is of type QEMUFileBuffered, andwait_for_unfreeze() expect to receive a MigrationState, that'coincidentaly' is s->opaque.
buffered_file: reuse QEMUFile has_error field
Instead of having two has_error fields in QEMUFile & QEMUBufferedFile,reuse the 1st one. Notice that the one in buffered_file is only setafter a file operation.
Signed-off-by: Juan Quintela <quintela@redhat.com>...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
change all rt_clock references to use millisecond resolution accessors
This was done with:
sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \ $(git grep -l 'get_clock\>.*rt_clock' ) sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \...
migration: allow rate > 4g
I'd like to disable bandwidth limit or make it very high,Use int64_t all over to make values >= 4g work.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Tested-by: Jason Wang <jasowang@redhat.com>
QEMUFileBuffered: indicate that we're ready when the underlying file is ready
QEMUFileBuffered stops writing when the underlying QEMUFile is not ready,and tells its producer so. However, when the underlying QEMUFile becomesready, it neglects to pass that information along, resulting in stoppage...
set proper migration status on ->write error (v5)
If ->write fails, declare migration status as MIG_STATE_ERROR.
Also, in buffered_file.c, ->close the object in case of anerror.
Fixes "migrate -d "exec:dd of=file", where dd fails to open file.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>...
Do not use dprintf
dprintf is already claimed by POSIX1, and on at least one systemis implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Signed-off-by: malc <av1474@comtv.ru>
Block live migration
This patch introduces block migration called during live migration. Blockare being copied to the destination in an async way. First the code willtransfer the whole disk and then transfer all dirty blocks accumulted duringthe migration....
Fix compilation warnings when DEBUG_BUFFERED_FILE is defined
gcc 4.3.2 throws warnings when DEBUG_BUFFERED_FILE is defined, becausewe are using the wrong format specifiers to print size_t/ssize_t values.
Fix most warnings (errors with -Werror) when debugging is enabled
I used the following command to enable debugging:perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*
introduce set_rate_limit function for QEMUFile
This patch converts the current callers of qemu_fopen_ops().
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Remove unnecessary trailing newlines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
Introduce a buffered file wrapper for QEMUFile
This patch introduces a buffered QEMUFile wrapper. This allows QEMUFile's to berate limited. It also makes it easier to implement a QEMUFile that isasynchronous since the current QEMUFile API requires that all reads and writes...