diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/rdma.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/migration/rdma.c b/migration/rdma.c index 189932097e..1a74c6d955 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -2283,7 +2283,7 @@ retry: * We support sending out multiple chunks at the same time. * Not all of them need to get signaled in the completion queue. */ -static int qemu_rdma_write_flush(RDMAContext *rdma) +static int qemu_rdma_write_flush(RDMAContext *rdma, Error **errp) { int ret; @@ -2295,6 +2295,7 @@ static int qemu_rdma_write_flush(RDMAContext *rdma) rdma->current_index, rdma->current_addr, rdma->current_length); if (ret < 0) { + error_setg(errp, "FIXME temporary error message"); return -1; } @@ -2368,6 +2369,7 @@ static int qemu_rdma_write(RDMAContext *rdma, uint64_t block_offset, uint64_t offset, uint64_t len) { + Error *err = NULL; uint64_t current_addr = block_offset + offset; uint64_t index = rdma->current_index; uint64_t chunk = rdma->current_chunk; @@ -2375,8 +2377,9 @@ static int qemu_rdma_write(RDMAContext *rdma, /* If we cannot merge it, we flush the current buffer first. */ if (!qemu_rdma_buffer_mergeable(rdma, current_addr, len)) { - ret = qemu_rdma_write_flush(rdma); + ret = qemu_rdma_write_flush(rdma, &err); if (ret < 0) { + error_report_err(err); return -1; } rdma->current_length = 0; @@ -2393,7 +2396,10 @@ static int qemu_rdma_write(RDMAContext *rdma, /* flush it if buffer is too large */ if (rdma->current_length >= RDMA_MERGE_MAX) { - return qemu_rdma_write_flush(rdma); + if (qemu_rdma_write_flush(rdma, &err) < 0) { + error_report_err(err); + return -1; + } } return 0; @@ -2857,10 +2863,9 @@ static ssize_t qio_channel_rdma_writev(QIOChannel *ioc, * Push out any writes that * we're queued up for VM's ram. */ - ret = qemu_rdma_write_flush(rdma); + ret = qemu_rdma_write_flush(rdma, errp); if (ret < 0) { rdma->errored = true; - error_setg(errp, "qemu_rdma_write_flush failed"); return -1; } @@ -3002,9 +3007,11 @@ static ssize_t qio_channel_rdma_readv(QIOChannel *ioc, */ static int qemu_rdma_drain_cq(RDMAContext *rdma) { + Error *err = NULL; int ret; - if (qemu_rdma_write_flush(rdma) < 0) { + if (qemu_rdma_write_flush(rdma, &err) < 0) { + error_report_err(err); return -1; } |