qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 09/36] migration: don't "write" when migration is no


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 09/36] migration: don't "write" when migration is not active
Date: Tue, 11 Oct 2011 12:00:29 +0200

If migration is not active, just ignore writes.

Signed-off-by: Juan Quintela <address@hidden>
---
 migration.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/migration.c b/migration.c
index 7ac1fc2..090c925 100644
--- a/migration.c
+++ b/migration.c
@@ -323,6 +323,10 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void 
*data, size_t size)
     FdMigrationState *s = opaque;
     ssize_t ret;

+    if (s->state != MIG_STATE_ACTIVE) {
+        return -EIO;
+    }
+
     do {
         ret = s->write(s, data, size);
     } while (ret == -1 && ((s->get_error(s)) == EINTR));
-- 
1.7.6.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]