Skip to content

Commit

Permalink
migration: fix live migration failure with compression
Browse files Browse the repository at this point in the history
Because of commit 11808bb, which remove some condition checks
of 'f->ops->writev_buffer', 'qemu_put_qemu_file' should be enhanced
to clear the 'f_src->iovcnt', or 'f_src->iovcnt' may exceed the
MAX_IOV_SIZE which will break live migration. This should be fixed.

Signed-off-by: Liang Li <liang.z.li@intel.com>
Reported-by: Jinshi Zhang <jinshi.c.zhang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <1470702146-24399-1-git-send-email-liang.z.li@intel.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
  • Loading branch information
Liang Li authored and Amit Shah committed Aug 11, 2016
1 parent 0e8b3cd commit 787d134
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions migration/qemu-file.c
Expand Up @@ -668,6 +668,7 @@ int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src)
len = f_src->buf_index;
qemu_put_buffer(f_des, f_src->buf, f_src->buf_index);
f_src->buf_index = 0;
f_src->iovcnt = 0;
}
return len;
}
Expand Down

0 comments on commit 787d134

Please sign in to comment.