[PATCH] migration: Report the error returned when save_live_iterate fails

David Edmondson posted 1 patch 4 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211215141437.1238403-1-david.edmondson@oracle.com
Maintainers: Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
migration/savevm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] migration: Report the error returned when save_live_iterate fails
Posted by David Edmondson 4 years, 1 month ago
Should qemu_savevm_state_iterate() encounter a failure when calling a
particular save_live_iterate function, report the error code returned
by the function.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
---
 migration/savevm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/migration/savevm.c b/migration/savevm.c
index d59e976d50..26aac04d91 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1298,8 +1298,9 @@ int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy)
         save_section_footer(f, se);
 
         if (ret < 0) {
-            error_report("failed to save SaveStateEntry with id(name): %d(%s)",
-                         se->section_id, se->idstr);
+            error_report("failed to save SaveStateEntry with id(name): "
+                         "%d(%s): %d",
+                         se->section_id, se->idstr, ret);
             qemu_file_set_error(f, ret);
         }
         if (ret <= 0) {
-- 
2.33.0


Re: [PATCH] migration: Report the error returned when save_live_iterate fails
Posted by Dr. David Alan Gilbert 4 years, 1 month ago
* David Edmondson (david.edmondson@oracle.com) wrote:
> Should qemu_savevm_state_iterate() encounter a failure when calling a
> particular save_live_iterate function, report the error code returned
> by the function.
> 
> Signed-off-by: David Edmondson <david.edmondson@oracle.com>
> ---
>  migration/savevm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/migration/savevm.c b/migration/savevm.c
> index d59e976d50..26aac04d91 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1298,8 +1298,9 @@ int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy)
>          save_section_footer(f, se);
>  
>          if (ret < 0) {
> -            error_report("failed to save SaveStateEntry with id(name): %d(%s)",
> -                         se->section_id, se->idstr);
> +            error_report("failed to save SaveStateEntry with id(name): "
> +                         "%d(%s): %d",
> +                         se->section_id, se->idstr, ret);


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

>              qemu_file_set_error(f, ret);
>          }
>          if (ret <= 0) {
> -- 
> 2.33.0
> 
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


Re: [PATCH] migration: Report the error returned when save_live_iterate fails
Posted by Juan Quintela 4 years ago
David Edmondson <david.edmondson@oracle.com> wrote:
> Should qemu_savevm_state_iterate() encounter a failure when calling a
> particular save_live_iterate function, report the error code returned
> by the function.
>
> Signed-off-by: David Edmondson <david.edmondson@oracle.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

queued