summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJianjun Duan2017-01-19 20:00:53 +0100
committerDr. David Alan Gilbert2017-01-24 18:54:47 +0100
commitcde7ee5974e83598feaefacc9e74f6767dd6f3ec (patch)
tree22af57300a512f7b950f94e154093ba4a9261767
parenttests/migration: Add test for QTAILQ migration (diff)
downloadqemu-cde7ee5974e83598feaefacc9e74f6767dd6f3ec.tar.gz
qemu-cde7ee5974e83598feaefacc9e74f6767dd6f3ec.tar.xz
qemu-cde7ee5974e83598feaefacc9e74f6767dd6f3ec.zip
migration: add error_report
Added error_report where version_ids do not match in vmstate_load_state. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-5-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-rw-r--r--migration/vmstate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/migration/vmstate.c b/migration/vmstate.c
index 2f9d4ba160..8ddd2302ea 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -85,6 +85,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
trace_vmstate_load_state(vmsd->name, version_id);
if (version_id > vmsd->version_id) {
+ error_report("%s: incoming version_id %d is too new "
+ "for local version_id %d",
+ vmsd->name, version_id, vmsd->version_id);
trace_vmstate_load_state_end(vmsd->name, "too new", -EINVAL);
return -EINVAL;
}
@@ -95,6 +98,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
trace_vmstate_load_state_end(vmsd->name, "old path", ret);
return ret;
}
+ error_report("%s: incoming version_id %d is too old "
+ "for local minimum version_id %d",
+ vmsd->name, version_id, vmsd->minimum_version_id);
trace_vmstate_load_state_end(vmsd->name, "too old", -EINVAL);
return -EINVAL;
}