[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/5] migration: Refactor error handling in source return p
|
From: |
Juan Quintela |
|
Subject: |
Re: [PATCH v4 1/5] migration: Refactor error handling in source return path |
|
Date: |
Tue, 31 Oct 2023 14:47:52 +0100 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) |
Peter Xu <peterx@redhat.com> wrote:
> rp_state.error was a boolean used to show error happened in return path
> thread. That's not only duplicating error reporting (migrate_set_error),
> but also not good enough in that we only do error_report() and set it to
> true, we never can keep a history of the exact error and show it in
> query-migrate.
>
> To make this better, a few things done:
>
> - Use error_setg() rather than error_report() across the whole lifecycle
> of return path thread, keeping the error in an Error*.
>
> - With above, no need to have mark_source_rp_bad(), remove it, alongside
> with rp_state.error itself.
>
> - Use migrate_set_error() to apply that captured error to the global
> migration object when error occured in this thread.
>
> - Do the same when detected qemufile error in source return path
>
> We need to re-export qemu_file_get_error_obj() to do the last one.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Patch is really long.
And you stated in the commit how to split it to make it more "digestable".