From: Juan Quintela <quintela@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, "Fabiano Rosas" <farosas@suse.de>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v4 5/5] migration: Change ram_save_queue_pages() retval to bool
Date: Tue, 31 Oct 2023 15:34:08 +0100 [thread overview]
Message-ID: <87a5ry7ten.fsf@secure.mitica> (raw)
In-Reply-To: <20231017202633.296756-6-peterx@redhat.com> (Peter Xu's message of "Tue, 17 Oct 2023 16:26:33 -0400")
Peter Xu <peterx@redhat.com> wrote:
> After we have errp which contains the more detailed error message, make
> ram_save_queue_pages() returns bool in its stack.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> migration/ram.h | 4 ++--
> migration/migration.c | 16 ++++++++--------
> migration/ram.c | 18 +++++++++---------
> 3 files changed, 19 insertions(+), 19 deletions(-)
>
> static bool migrate_handle_rp_recv_bitmap(MigrationState *s, char *block_name,
> @@ -1990,8 +1992,7 @@ static void *source_return_path_thread(void *opaque)
> case MIG_RP_MSG_REQ_PAGES:
> start = ldq_be_p(buf);
> len = ldl_be_p(buf + 8);
> - migrate_handle_rp_req_pages(ms, NULL, start, len, &err);
> - if (err) {
> + if (!migrate_handle_rp_req_pages(ms, NULL, start, len, &err)) {
I thought we were headed the other direction.
Make functions return void and just check if the error is set.
I think just change the type form returning int to return void will make
the trick.
Later, Juan.
prev parent reply other threads:[~2023-10-31 14:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 20:26 [PATCH v4 0/5] migration: Better error handling in rp thread, allow failures in recover Peter Xu
2023-10-17 20:26 ` [PATCH v4 1/5] migration: Refactor error handling in source return path Peter Xu
2023-10-19 21:09 ` Fabiano Rosas
2023-10-31 13:47 ` Juan Quintela
2023-10-17 20:26 ` [PATCH v4 2/5] migration: Allow network to fail even during recovery Peter Xu
2023-10-31 14:26 ` Juan Quintela
2023-10-31 15:32 ` Peter Xu
2023-10-17 20:26 ` [PATCH v4 3/5] tests/migration-test: Add a test for postcopy hangs during RECOVER Peter Xu
2023-10-31 22:01 ` Fabiano Rosas
2023-10-31 22:19 ` Peter Xu
2023-10-31 22:34 ` Juan Quintela
2023-10-17 20:26 ` [PATCH v4 4/5] migration: Change ram_dirty_bitmap_reload() retval to bool Peter Xu
2023-10-19 21:12 ` Fabiano Rosas
2023-10-31 14:30 ` Juan Quintela
2023-10-17 20:26 ` [PATCH v4 5/5] migration: Change ram_save_queue_pages() " Peter Xu
2023-10-19 21:13 ` Fabiano Rosas
2023-10-31 14:34 ` Juan Quintela [this message]
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=87a5ry7ten.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.