From: Juan Quintela <quintela@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
Leonardo Bras <leobras@redhat.com>
Subject: Re: [PATCH 2/3] migration/multifd: Unify multifd_send_thread error paths
Date: Mon, 16 Oct 2023 10:48:22 +0200 [thread overview]
Message-ID: <878r833qcp.fsf@secure.mitica> (raw)
In-Reply-To: <20231012134343.23757-3-farosas@suse.de> (Fabiano Rosas's message of "Thu, 12 Oct 2023 10:43:42 -0300")
Fabiano Rosas <farosas@suse.de> wrote:
> The preferred usage of the Error type is to always set both the return
> code and the error when a failure happens. As all code called from the
> send thread follows this pattern, we'll always have the return code
> and the error set at the same time.
>
> Aside from the convention, in this piece of code this must be the
> case, otherwise the if (ret != 0) would be exiting the thread without
> calling multifd_send_terminate_threads() which is incorrect.
>
> Unify both paths to make it clear that both are taken when there's an
> error.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
queued.
next prev parent reply other threads:[~2023-10-16 8:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 13:43 [PATCH 0/3] migration/multifd: General cleanups Fabiano Rosas
2023-10-12 13:43 ` [PATCH 1/3] migration/multifd: Remove direct "socket" references Fabiano Rosas
2023-10-12 13:53 ` Philippe Mathieu-Daudé
2023-10-16 8:45 ` Juan Quintela
2023-10-12 13:43 ` [PATCH 2/3] migration/multifd: Unify multifd_send_thread error paths Fabiano Rosas
2023-10-16 8:48 ` Juan Quintela [this message]
2023-10-12 13:43 ` [PATCH 3/3] migration/multifd: Clarify Error usage in multifd_channel_connect Fabiano Rosas
2023-10-12 13:53 ` Philippe Mathieu-Daudé
2023-10-16 8:50 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878r833qcp.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=farosas@suse.de \
--cc=leobras@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).