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

Wei Yang posted 4 patches 6 years, 1 month ago
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Juan Quintela <quintela@redhat.com>
[PATCH 4/4] migration: report SaveStateEntry id and name on failure
Posted by Wei Yang 6 years, 1 month ago
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) {
-- 
2.17.1


Re: [PATCH 4/4] migration: report SaveStateEntry id and name on failure
Posted by Philippe Mathieu-Daudé 6 years, 1 month ago
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>