From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Jianjun Duan <duanj@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, dmitry@daynix.com,
peter.maydell@linaro.org, kraxel@redhat.com, mst@redhat.com,
david@gibson.dropbear.id.au, pbonzini@redhat.com,
veroniabahaa@gmail.com, quintela@redhat.com,
amit.shah@redhat.com, mreitz@redhat.com, kwolf@redhat.com,
rth@twiddle.net, aurelien@aurel32.net, leon.alrae@imgtec.com,
blauwirbel@gmail.com, mark.cave-ayland@ilande.co.uk,
mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [QEMU PATCH v14 4/4] migration: add error_report
Date: Wed, 7 Dec 2016 19:51:27 +0000 [thread overview]
Message-ID: <20161207195127.GE2073@work-vm> (raw)
In-Reply-To: <1479923640-8423-5-git-send-email-duanj@linux.vnet.ibm.com>
* Jianjun Duan (duanj@linux.vnet.ibm.com) wrote:
> Added error_report where version_ids do not match in vmstate_load_state.
>
> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com>
Yes, but the error message would be better if it printed
the two version numbers so you could see what went wrong.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/vmstate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/migration/vmstate.c b/migration/vmstate.c
> index 2f9d4ba..0e6fce4 100644
> --- a/migration/vmstate.c
> +++ b/migration/vmstate.c
> @@ -85,6 +85,7 @@ 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 %s", vmsd->name, "too new");
> trace_vmstate_load_state_end(vmsd->name, "too new", -EINVAL);
> return -EINVAL;
> }
> @@ -95,6 +96,7 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
> trace_vmstate_load_state_end(vmsd->name, "old path", ret);
> return ret;
> }
> + error_report("%s %s", vmsd->name, "too old");
> trace_vmstate_load_state_end(vmsd->name, "too old", -EINVAL);
> return -EINVAL;
> }
> --
> 1.9.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-12-07 19:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 17:53 [Qemu-devel] [QEMU PATCH v14 0/4] migration: migrate QTAILQ Jianjun Duan
2016-11-23 17:53 ` [Qemu-devel] [QEMU PATCH v14 1/4] migration: extend VMStateInfo Jianjun Duan
2016-12-07 11:36 ` Dr. David Alan Gilbert
2016-11-23 17:53 ` [Qemu-devel] [QEMU PATCH v14 2/4] migration: migrate QTAILQ Jianjun Duan
2016-12-07 12:39 ` Dr. David Alan Gilbert
2016-11-23 17:53 ` [Qemu-devel] [QEMU PATCH v14 3/4] tests/migration: Add test for QTAILQ migration Jianjun Duan
2016-12-07 19:49 ` Dr. David Alan Gilbert
2016-12-07 21:01 ` Jianjun Duan
2016-12-08 9:03 ` Dr. David Alan Gilbert
2016-12-08 17:45 ` [Qemu-devel] [Qemu-ppc] " Jianjun Duan
2016-12-07 19:50 ` [Qemu-devel] " Dr. David Alan Gilbert
2016-11-23 17:54 ` [Qemu-devel] [QEMU PATCH v14 4/4] migration: add error_report Jianjun Duan
2016-12-07 19:51 ` Dr. David Alan Gilbert [this message]
2016-12-05 18:06 ` [Qemu-devel] [QEMU PATCH v14 0/4] migration: migrate QTAILQ Jianjun Duan
2016-12-07 19:54 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161207195127.GE2073@work-vm \
--to=dgilbert@redhat.com \
--cc=amit.shah@redhat.com \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=dmitry@daynix.com \
--cc=duanj@linux.vnet.ibm.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=leon.alrae@imgtec.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=veroniabahaa@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.