Re: [PATCH 12/14] migration: Report error when shutdown fails

2024-02-07 Thread Peter Xu
On Wed, Feb 07, 2024 at 02:33:45PM +0100, Cédric Le Goater wrote:
> This will help detect issues regarding I/O channels usage.
> 
> Signed-off-by: Cédric Le Goater 

Reviewed-by: Peter Xu 

-- 
Peter Xu




Re: [PATCH 12/14] migration: Report error when shutdown fails

2024-02-07 Thread Philippe Mathieu-Daudé

On 7/2/24 14:33, Cédric Le Goater wrote:

This will help detect issues regarding I/O channels usage.


English isn't my native language but I'd expect "detecting" here.


Signed-off-by: Cédric Le Goater 
---
  migration/qemu-file.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)


Reviewed-by: Philippe Mathieu-Daudé 





[PATCH 12/14] migration: Report error when shutdown fails

2024-02-07 Thread Cédric Le Goater
This will help detect issues regarding I/O channels usage.

Signed-off-by: Cédric Le Goater 
---
 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, ) < 0) {
+error_report_err(err);
 return -EIO;
 }
 
-- 
2.43.0