diff mbox series

[4/4] migration: report SaveStateEntry id and name on failure

Message ID 20191005220517.24029-5-richardw.yang@linux.intel.com
State New
Headers show
Series migration: trivial cleanup and refine | expand

Commit Message

Wei Yang Oct. 5, 2019, 10:05 p.m. UTC
This provides helpful information on which entry failed.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 migration/savevm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Philippe Mathieu-Daudé Oct. 7, 2019, 10:08 a.m. UTC | #1
On 10/6/19 12:05 AM, Wei Yang wrote:
> This provides helpful information on which entry failed.
> 
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
> ---
>   migration/savevm.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 9f0122583d..feb757de79 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1215,6 +1215,8 @@ 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);
>               qemu_file_set_error(f, ret);
>           }
>           if (ret <= 0) {
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff mbox series

Patch

diff --git a/migration/savevm.c b/migration/savevm.c
index 9f0122583d..feb757de79 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1215,6 +1215,8 @@  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);
             qemu_file_set_error(f, ret);
         }
         if (ret <= 0) {