[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 10/26] migration: Move cleanup after after error reporting
From: |
Peter Xu |
Subject: |
Re: [PATCH v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup() |
Date: |
Tue, 5 Mar 2024 11:32:37 +0800 |
On Mon, Mar 04, 2024 at 01:28:28PM +0100, Cédric Le Goater wrote:
> This will help preserving the error set by .save_setup() handlers.
>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
IIUC this is about the next patch. I got fully confused before reading
into the next one. IMHO we can squash it into where it's used.
Thanks,
> ---
> migration/savevm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/migration/savevm.c b/migration/savevm.c
> index
> 31ce9391d49c825d4ec835e26ac0246e192783a0..e400706e61e06d2d1d03a11aed14f30a243833f2
> 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1740,10 +1740,10 @@ static int qemu_savevm_state(QEMUFile *f, Error
> **errp)
> qemu_savevm_state_complete_precopy(f, false, false);
> ret = qemu_file_get_error(f);
> }
> - qemu_savevm_state_cleanup();
> if (ret != 0) {
> error_setg_errno(errp, -ret, "Error while writing VM state");
> }
> + qemu_savevm_state_cleanup();
>
> if (ret != 0) {
> status = MIGRATION_STATUS_FAILED;
> --
> 2.44.0
>
>
--
Peter Xu
[PATCH v3 05/26] migration: Add Error** argument to vmstate_save(), Cédric Le Goater, 2024/03/04
[PATCH v3 07/26] migration: Remove SaveStateHandler and LoadStateHandler typedefs, Cédric Le Goater, 2024/03/04
[PATCH v3 06/26] migration: Report error when shutdown fails, Cédric Le Goater, 2024/03/04
[PATCH v3 08/26] migration: Add documentation for SaveVMHandlers, Cédric Le Goater, 2024/03/04
[PATCH v3 09/26] migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error, Cédric Le Goater, 2024/03/04
[PATCH v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup(), Cédric Le Goater, 2024/03/04
- Re: [PATCH v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup(),
Peter Xu <=
[PATCH v3 13/26] migration: Add Error** argument to .load_setup() handler, Cédric Le Goater, 2024/03/04
[PATCH v3 14/26] memory: Add Error** argument to .log_global*() handlers, Cédric Le Goater, 2024/03/04
[PATCH v3 12/26] migration: Add Error** argument to .save_setup() handler, Cédric Le Goater, 2024/03/04
[PATCH v3 17/26] vfio: Add Error** argument to .set_dirty_page_tracking() handler, Cédric Le Goater, 2024/03/04
[PATCH v3 19/26] vfio: Add Error** argument to vfio_devices_dma_logging_stop(), Cédric Le Goater, 2024/03/04
[PATCH v3 11/26] migration: Add Error** argument to qemu_savevm_state_setup(), Cédric Le Goater, 2024/03/04