aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-09-28 15:20:17 +0200
committerJuan Quintela <quintela@redhat.com>2023-10-11 11:17:04 +0200
commit5cec563d0cc4d2ce4983f31c472f022f9fd57d7a (patch)
tree4da8b1fc006c58e34c0756d7979544a203d92893 /migration
parentb765d21e4aba49dc5c87f3b05532b6b9cc64a2a5 (diff)
downloadqemu-5cec563d0cc4d2ce4983f31c472f022f9fd57d7a.zip
qemu-5cec563d0cc4d2ce4983f31c472f022f9fd57d7a.tar.gz
qemu-5cec563d0cc4d2ce4983f31c472f022f9fd57d7a.tar.bz2
migration/rdma: Downgrade qemu_rdma_cleanup() errors to warnings
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is bogus. qemu_rdma_source_init(), qemu_rdma_connect(), rdma_start_incoming_migration(), and rdma_start_outgoing_migration() violate this principle: they call error_report() via qemu_rdma_cleanup(). Moreover, qemu_rdma_cleanup() can't fail. It is called on error paths, and QIOChannel close and finalization. Are the conditions it reports really errors? I doubt it. Downgrade qemu_rdma_cleanup()'s errors to warnings. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230928132019.2544702-52-armbru@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/rdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index 025523b..9d5b3b7 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -2375,9 +2375,9 @@ static void qemu_rdma_cleanup(RDMAContext *rdma)
.type = RDMA_CONTROL_ERROR,
.repeat = 1,
};
- error_report("Early error. Sending error.");
+ warn_report("Early error. Sending error.");
if (qemu_rdma_post_send_control(rdma, NULL, &head, &err) < 0) {
- error_report_err(err);
+ warn_report_err(err);
}
}