From patchwork Thu Jan 17 13:39:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [09/13] migration: Add buffered_flush error handling Date: Thu, 17 Jan 2013 03:39:29 -0000 From: Juan Quintela X-Patchwork-Id: 213293 Message-Id: <1358429973-9321-10-git-send-email-quintela@redhat.com> To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com Now that we have error handling we can do proper handling of buffered_flush(). Signed-off-by: Juan Quintela Reviewed-by: Reviewed-by: Eric Blake Reviewed-by: Paolo Bonzini --- migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 7ae1d93..17eb27d 100644 --- a/migration.c +++ b/migration.c @@ -757,7 +757,8 @@ static void *buffered_file_thread(void *opaque) /* usleep expects microseconds */ g_usleep((initial_time + BUFFER_DELAY - current_time)*1000); } - if (buffered_flush(s) < 0) { + ret = buffered_flush(s); + if (ret < 0) { break; }