qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 02/11] migration: Let migrate_set_error() take ownership


From: Fabiano Rosas
Subject: Re: [PATCH v2 02/11] migration: Let migrate_set_error() take ownership
Date: Wed, 13 Sep 2023 10:32:38 -0300

Peter Xu <peterx@redhat.com> writes:

> migrate_set_error() used one error_copy() so it always copy an error.
> However that's not the major use case - the major use case is one would
> like to pass the error to migrate_set_error() without further touching the
> error.
>
> It can be proved if we see most of the callers are freeing the error
> explicitly right afterwards.  There're a few outliers (only if when the
> caller) where we can use error_copy() explicitly there.
>
> Drop three call sites where we called migrate_set_error() then following a
> error_report_err(): otherwise we need to do error_copy() for them. Since we
> already have them stored in MigrationState.error, the error report can be
> slightly duplicated.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>




reply via email to

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