From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: peterx@redhat.com, Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v2 02/11] migration: Let migrate_set_error() take ownership
Date: Wed, 13 Sep 2023 10:32:38 -0300 [thread overview]
Message-ID: <877coukxl5.fsf@suse.de> (raw)
In-Reply-To: <20230912222145.731099-3-peterx@redhat.com>
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>
next prev parent reply other threads:[~2023-09-13 13:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 22:21 [PATCH v2 00/11] migration: Better error handling in rp thread, allow failures in recover Peter Xu
2023-09-12 22:21 ` [PATCH v2 01/11] migration: Display error in query-migrate irrelevant of status Peter Xu
2023-09-12 22:21 ` [PATCH v2 02/11] migration: Let migrate_set_error() take ownership Peter Xu
2023-09-13 13:32 ` Fabiano Rosas [this message]
2023-09-12 22:21 ` [PATCH v2 03/11] migration: Introduce migrate_has_error() Peter Xu
2023-09-12 22:21 ` [PATCH v2 04/11] migration: Refactor error handling in source return path Peter Xu
2023-09-12 22:21 ` [PATCH v2 05/11] migration: Deliver return path file error to migrate state too Peter Xu
2023-09-12 22:21 ` [PATCH v2 06/11] qemufile: Always return a verbose error Peter Xu
2023-09-12 22:21 ` [PATCH v2 07/11] migration: Remember num of ramblocks to sync during recovery Peter Xu
2023-09-12 22:21 ` [PATCH v2 08/11] migration: Add migration_rp_wait|kick() Peter Xu
2023-09-12 22:21 ` [PATCH v2 09/11] migration: Allow network to fail even during recovery Peter Xu
2023-09-13 13:36 ` Fabiano Rosas
2023-09-12 22:21 ` [PATCH v2 10/11] migration: Allow RECOVER->PAUSED convertion for dest qemu Peter Xu
2023-09-13 13:37 ` Fabiano Rosas
2023-09-12 22:21 ` [PATCH v2 11/11] tests/migration-test: Add a test for postcopy hangs during RECOVER Peter Xu
2023-09-13 14:27 ` Fabiano Rosas
2023-09-13 14:38 ` Peter Xu
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=877coukxl5.fsf@suse.de \
--to=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).