summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2009-05-19 14:08:53 +0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-05-20 09:12:57 -0500
commit95b134ea02a3e2c2508f907db4ab1379ffdb0bef (patch)
treea45e38e31af24878b2a34caaa57454f8f8822fb2 /migration.c
parent76ae317f7c16aec6b469604b1764094870a75470 (diff)
downloadqemu-95b134ea02a3e2c2508f907db4ab1379ffdb0bef.tar.gz
qemu-95b134ea02a3e2c2508f907db4ab1379ffdb0bef.tar.bz2
qemu-95b134ea02a3e2c2508f907db4ab1379ffdb0bef.zip
migrate.c: migrate_fd_put_buffer: Do not busyloop: stop writing if EWOULDBLOCK
The migration code is non-blocking, designed for live migration. Practically migrate_fd_put_buffer busy-loops trying to write, as on many machines EWOULDBLOCK==EAGAIN (look in include/asm-generic/errno.h). Signed-off-by: Uri Lublin <uril@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration.c b/migration.c
index 859d945434..ca397faf71 100644
--- a/migration.c
+++ b/migration.c
@@ -176,7 +176,7 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
do {
ret = s->write(s, data, size);
- } while (ret == -1 && ((s->get_error(s)) == EINTR || (s->get_error(s)) == EWOULDBLOCK));
+ } while (ret == -1 && ((s->get_error(s)) == EINTR));
if (ret == -1)
ret = -(s->get_error(s));