[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 01/25] migration: Report error when shutdown fails
From: |
Cédric Le Goater |
Subject: |
[PATCH v4 01/25] migration: Report error when shutdown fails |
Date: |
Wed, 6 Mar 2024 14:34:16 +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
b10c8826296808d815d01ee4ed4912f0ca4313d9..a10882d47fcbc17f136653b9c4afd914552c8c8d
100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -63,6 +63,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
@@ -91,7 +93,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
- [PATCH v4 00/25] migration: Improve error reporting, Cédric Le Goater, 2024/03/06
- [PATCH v4 02/25] migration: Remove SaveStateHandler and LoadStateHandler typedefs, Cédric Le Goater, 2024/03/06
- [PATCH v4 01/25] migration: Report error when shutdown fails,
Cédric Le Goater <=
- [PATCH v4 03/25] migration: Add documentation for SaveVMHandlers, Cédric Le Goater, 2024/03/06
- [PATCH v4 04/25] migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error, Cédric Le Goater, 2024/03/06
- [PATCH v4 05/25] s390/stattrib: Add Error** argument to set_migrationmode() handler, Cédric Le Goater, 2024/03/06
- [PATCH v4 07/25] migration: Always report an error in block_save_setup(), Cédric Le Goater, 2024/03/06