aboutsummaryrefslogtreecommitdiff
path: root/migration/rdma.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-06-11 18:17:28 +0100
committerJuan Quintela <quintela@redhat.com>2015-07-07 14:54:50 +0200
commitef4b722d19cab845eaa0d1f912018b09a9d8288b (patch)
treecf627043e28070e9cc730485800c463bd7cd30dd /migration/rdma.c
parentafcddefdbe75d0c20bf6e11b5512ba768ce0700c (diff)
Fail more cleanly in mismatched RAM cases
If the number of RAMBlocks was different on the source from the destination, QEMU would hang waiting for a disconnect on the source and wouldn't release from that hang until the destination was manually killed. Mark the stream as being in error, this causes the destination to die and the source to carry on. (It still gets a whole bunch of warnings on the destination, and I've not managed to complete another migration after the 1st one, still progress). Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/rdma.c')
-rw-r--r--migration/rdma.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index 73a79be645..f106b2a818 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3328,6 +3328,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
"Your QEMU command line parameters are probably "
"not identical on both the source and destination.",
local->nb_blocks, nb_dest_blocks);
+ rdma->error_state = -EINVAL;
return -EINVAL;
}
@@ -3343,6 +3344,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
"vs %" PRIu64, local->block[i].block_name, i,
local->block[i].length,
rdma->dest_blocks[i].length);
+ rdma->error_state = -EINVAL;
return -EINVAL;
}
local->block[i].remote_host_addr =