[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/26] migration: Report error when shutdown fails
From: |
Cédric Le Goater |
Subject: |
[PATCH v3 06/26] migration: Report error when shutdown fails |
Date: |
Mon, 4 Mar 2024 13:28:24 +0100 |
This will help detect issues regarding I/O channels usage.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
migration/qemu-file.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index
94231ff2955c80b3d0fab11a40510d34c334a826..b69e0c62e2fcf21d346a3687df7eebee23791fdc
100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -62,6 +62,8 @@ struct QEMUFile {
*/
int qemu_file_shutdown(QEMUFile *f)
{
+ Error *err = NULL;
+
/*
* We must set qemufile error before the real shutdown(), otherwise
* there can be a race window where we thought IO all went though
@@ -90,7 +92,8 @@ int qemu_file_shutdown(QEMUFile *f)
return -ENOSYS;
}
- if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) {
+ if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, &err) < 0) {
+ error_report_err(err);
return -EIO;
}
--
2.44.0
- Re: [PATCH v3 03/26] migration: Always report an error in block_save_setup(), (continued)
- [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 <=
- [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
- [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