[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/7] migration: Refactor error handling in source return path
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH 3/7] migration: Refactor error handling in source return path |
Date: |
Wed, 28 Jun 2023 19:51:39 -0300 |
Peter Xu <peterx@redhat.com> writes:
> 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*.
>
> - Use migrate_set_error() to apply that captured error to the global
> migration object when error occured in this thread.
>
> - With above, no need to have mark_source_rp_bad(), remove it, alongside
> with rp_state.error itself.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
- [PATCH 0/7] migration: Better error handling in return path thread, Peter Xu, 2023/06/28
- [PATCH 1/7] migration: Let migrate_set_error() take ownership, Peter Xu, 2023/06/28
- [PATCH 2/7] migration: Introduce migrate_has_error(), Peter Xu, 2023/06/28
- [PATCH 4/7] migration: Deliver return path file error to migrate state too, Peter Xu, 2023/06/28
- [PATCH 3/7] migration: Refactor error handling in source return path, Peter Xu, 2023/06/28
- Re: [PATCH 3/7] migration: Refactor error handling in source return path,
Fabiano Rosas <=
- [PATCH 6/7] qemufile: Always return a verbose error, Peter Xu, 2023/06/28
- [PATCH 5/7] migration: Display error in query-migrate irrelevant of status, Peter Xu, 2023/06/28
- [PATCH 7/7] migration: Provide explicit error message for file shutdowns, Peter Xu, 2023/06/28