diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-02-22 17:36:15 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-03-11 13:32:01 +0100 |
commit | f5821518ed6d49aae9fd0aa6169d2d74bb83054c (patch) | |
tree | 7dd7161fa60052a71aaa4f40fb3cf3885d1ecd33 | |
parent | 4eb938102b3d533e142de23e255e46da1326fc5a (diff) | |
download | qemu-f5821518ed6d49aae9fd0aa6169d2d74bb83054c.zip qemu-f5821518ed6d49aae9fd0aa6169d2d74bb83054c.tar.gz qemu-f5821518ed6d49aae9fd0aa6169d2d74bb83054c.tar.bz2 |
migration: flush all data to fd when buffered_flush is called
Including data that resided in the QEMUFile's own buffer.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r-- | migration.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration.c b/migration.c index 10ce9fe..c5a7f29 100644 --- a/migration.c +++ b/migration.c @@ -525,6 +525,8 @@ static ssize_t buffered_flush(MigrationState *s) DPRINTF("flushing %zu byte(s) of data\n", s->buffer_size); + qemu_fflush(s->file); + while (s->bytes_xfer < s->xfer_limit && offset < s->buffer_size) { size_t to_send = MIN(s->buffer_size - offset, s->xfer_limit - s->bytes_xfer); ret = migrate_fd_put_buffer(s, s->buffer + offset, to_send); |