Commit f5821518 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Juan Quintela
Browse files

migration: flush all data to fd when buffered_flush is called

Including data that resided in the QEMUFile's own buffer.
Reviewed-by: default avatarOrit Wasserman <>
Reviewed-by: default avatarJuan Quintela <>
Signed-off-by: default avatarPaolo Bonzini <>
Signed-off-by: default avatarJuan Quintela <>
parent 4eb93810
......@@ -525,6 +525,8 @@ static ssize_t buffered_flush(MigrationState *s)
DPRINTF("flushing %zu byte(s) of data\n", s->buffer_size);
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment