qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 5/5] migration: Change ram_save_queue_pages() retval to bo


From: Juan Quintela
Subject: Re: [PATCH v4 5/5] migration: Change ram_save_queue_pages() retval to bool
Date: Tue, 31 Oct 2023 15:34:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]