[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/16] migration/rdma: Send error during cancelling
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 06/16] migration/rdma: Send error during cancelling |
Date: |
Tue, 18 Jul 2017 17:41:17 +0200 |
From: "Dr. David Alan Gilbert" <address@hidden>
When we issue a cancel and clean up the RDMA channel
send a CONTROL_ERROR to get the destination to quit.
The rdma_cleanup code waits for the event to come back
from the rdma_disconnect; but that wont happen until the
destination quits and there's currently nothing to force
it.
Note this makes the case of a cancel work while the destination
is alive, and it already works if the destination is
truly dead. Note it doesn't fix the case where the destination
is hung (we get stuck waiting for the rdma_disconnect event).
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/rdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 972167d..ca56594 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -2269,7 +2269,9 @@ static void qemu_rdma_cleanup(RDMAContext *rdma)
int ret, idx;
if (rdma->cm_id && rdma->connected) {
- if (rdma->error_state && !rdma->received_error) {
+ if ((rdma->error_state ||
+ migrate_get_current()->state == MIGRATION_STATUS_CANCELLING) &&
+ !rdma->received_error) {
RDMAControlHeader head = { .len = 0,
.type = RDMA_CONTROL_ERROR,
.repeat = 1,
--
2.9.4
- [Qemu-devel] [PULL 00/16] Migration, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 02/16] migration: Close file on failed migration load, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 01/16] migration/rdma: Fix race on source, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 03/16] migration/rdma: fix qemu_rdma_block_for_wrid error paths, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 04/16] migration/rdma: Allow cancelling while waiting for wrid, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 05/16] migration/rdma: Safely convert control types, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 06/16] migration/rdma: Send error during cancelling,
Juan Quintela <=
- [Qemu-devel] [PULL 07/16] qdev: provide DEFINE_PROP_INT64(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 09/16] migration: export capabilities to props, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 08/16] migration: export parameters to props, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 10/16] migration: introduce migrate_params_check(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 11/16] migration: provide migrate_params_apply(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 13/16] migration: remove check against colo support, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 12/16] migration: check global params for validity, Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 14/16] migration: provide migrate_caps_check(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 15/16] migration: provide migrate_cap_add(), Juan Quintela, 2017/07/18
- [Qemu-devel] [PULL 16/16] migration: check global caps for validity, Juan Quintela, 2017/07/18