aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-09-13 17:35:06 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2019-09-25 15:51:19 +0100
commitde8434a35a7871f5f09ff1b22af2dad40a7a0fba (patch)
treed07682a39ed963dc2661727f797ebfbfc9148a07
parent64737606e8e54db28ac9dbfc10e175d267d2c8fb (diff)
migration/rdma: Don't moan about disconnects at the end
If we've already finished the migration or something has already gone wrong, don't moan about the migration stream disconnecting. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190913163507.1403-2-dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-rw-r--r--migration/rdma.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index 78e6b72bac..0fcf02f48e 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3253,10 +3253,14 @@ static void rdma_cm_poll_handler(void *opaque)
if (cm_event->event == RDMA_CM_EVENT_DISCONNECTED ||
cm_event->event == RDMA_CM_EVENT_DEVICE_REMOVAL) {
- error_report("receive cm event, cm event is %d", cm_event->event);
- rdma->error_state = -EPIPE;
- if (rdma->return_path) {
- rdma->return_path->error_state = -EPIPE;
+ if (!rdma->error_state &&
+ migration_incoming_get_current()->state !=
+ MIGRATION_STATUS_COMPLETED) {
+ error_report("receive cm event, cm event is %d", cm_event->event);
+ rdma->error_state = -EPIPE;
+ if (rdma->return_path) {
+ rdma->return_path->error_state = -EPIPE;
+ }
}
if (mis->migration_incoming_co) {