Commit 95b134ea02a3e2c2508f907db4ab1379ffdb0bef
Committed by
Anthony Liguori
1 parent
76ae317f
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>
Showing
1 changed file
with
1 additions
and
1 deletions
migration.c
... | ... | @@ -176,7 +176,7 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size) |
176 | 176 | |
177 | 177 | do { |
178 | 178 | ret = s->write(s, data, size); |
179 | - } while (ret == -1 && ((s->get_error(s)) == EINTR || (s->get_error(s)) == EWOULDBLOCK)); | |
179 | + } while (ret == -1 && ((s->get_error(s)) == EINTR)); | |
180 | 180 | |
181 | 181 | if (ret == -1) |
182 | 182 | ret = -(s->get_error(s)); | ... | ... |