From: Luiz Capitulino <lcapitulino@redhat.com>
To: Pavel Hrdina <phrdina@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 08/17] savevm: add error parameter to qemu_savevm_state_begin()
Date: Fri, 14 Dec 2012 14:45:16 -0200 [thread overview]
Message-ID: <20121214144516.782501b1@doriath.home> (raw)
In-Reply-To: <70bb440d178e3ebcaefa27f5817ea4f096e8e259.1355404685.git.phrdina@redhat.com>
On Thu, 13 Dec 2012 16:40:42 +0100
Pavel Hrdina <phrdina@redhat.com> wrote:
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
> migration.c | 2 +-
> savevm.c | 7 +++++--
> sysemu.h | 3 ++-
> 3 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index 73ce170..bf51a07 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -451,7 +451,7 @@ void migrate_fd_connect(MigrationState *s)
> s->file = qemu_fopen_ops_buffered(s);
>
> DPRINTF("beginning savevm\n");
> - ret = qemu_savevm_state_begin(s->file, &s->params);
> + ret = qemu_savevm_state_begin(s->file, &s->params, NULL);
> if (ret < 0) {
> DPRINTF("failed, %d\n", ret);
> migrate_fd_error(s);
> diff --git a/savevm.c b/savevm.c
> index 3ee7da5..633a697 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1601,7 +1601,8 @@ bool qemu_savevm_state_blocked(Error **errp)
> }
>
> int qemu_savevm_state_begin(QEMUFile *f,
> - const MigrationParams *params)
> + const MigrationParams *params,
> + Error **errp)
> {
> SaveStateEntry *se;
> int ret;
> @@ -1641,12 +1642,14 @@ int qemu_savevm_state_begin(QEMUFile *f,
>
> ret = se->ops->save_live_setup(f, se->opaque);
> if (ret < 0) {
> + error_setg(errp, "Failed to begin vmstate save.");
If possible, it would be nice to say why.
> qemu_savevm_state_cancel(f);
> return ret;
> }
> }
> ret = qemu_file_get_error(f);
> if (ret != 0) {
> + error_setg(errp, "%s", strerror(errno));
We have error_setg_errno().
> qemu_savevm_state_cancel(f);
> }
>
> @@ -1783,7 +1786,7 @@ static int qemu_savevm_state(QEMUFile *f)
> goto out;
> }
>
> - ret = qemu_savevm_state_begin(f, ¶ms);
> + ret = qemu_savevm_state_begin(f, ¶ms, NULL);
> if (ret < 0)
> goto out;
>
> diff --git a/sysemu.h b/sysemu.h
> index 1b6add2..07c5322 100644
> --- a/sysemu.h
> +++ b/sysemu.h
> @@ -74,7 +74,8 @@ void qemu_announce_self(void);
>
> bool qemu_savevm_state_blocked(Error **errp);
> int qemu_savevm_state_begin(QEMUFile *f,
> - const MigrationParams *params);
> + const MigrationParams *params,
> + Error **errp);
> int qemu_savevm_state_iterate(QEMUFile *f);
> int qemu_savevm_state_complete(QEMUFile *f);
> void qemu_savevm_state_cancel(QEMUFile *f);
next prev parent reply other threads:[~2012-12-14 16:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 15:40 [Qemu-devel] [PATCH v2 00/17] qapi: Convert savevm, loadvm, delvm and info snapshots Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 01/17] error: introduce handle_error Pavel Hrdina
2012-12-14 0:52 ` Eric Blake
2012-12-14 16:00 ` Luiz Capitulino
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 02/17] block: add error parameter to bdrv_snapshot_create() and related functions Pavel Hrdina
2012-12-14 16:29 ` Luiz Capitulino
2012-12-14 16:31 ` Luiz Capitulino
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 03/17] block: add error parameter to bdrv_snapshot_goto() " Pavel Hrdina
2012-12-14 16:30 ` Luiz Capitulino
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 04/17] block: add error parameter to bdrv_snapshot_delete() " Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 05/17] block: add error parameter to bdrv_snapshot_list() " Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 06/17] block: add error parameter to bdrv_snapshot_find() Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 07/17] block: add error parameter to del_existing_snapshots() Pavel Hrdina
2012-12-14 16:42 ` Luiz Capitulino
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 08/17] savevm: add error parameter to qemu_savevm_state_begin() Pavel Hrdina
2012-12-14 16:45 ` Luiz Capitulino [this message]
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 09/17] savevm: add error parameter to qemu_savevm_state_iterate() Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 10/17] savevm: add error parameter to qemu_savevm_state_complete() Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 11/17] savevm: add error parameter to qemu_savevm_state() Pavel Hrdina
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 12/17] savevm: add error parameter to qemu_loadvm_state() Pavel Hrdina
2012-12-14 16:52 ` Luiz Capitulino
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 13/17] qapi: Convert savevm Pavel Hrdina
2012-12-14 16:57 ` Luiz Capitulino
2012-12-14 17:09 ` Eric Blake
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 14/17] qapi: Convert loadvm Pavel Hrdina
2012-12-14 18:30 ` Eric Blake
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 15/17] qapi: Convert delvm Pavel Hrdina
2012-12-14 18:39 ` Eric Blake
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 16/17] qapi: Convert info snapshots Pavel Hrdina
2012-12-14 17:18 ` Luiz Capitulino
2012-12-13 15:40 ` [Qemu-devel] [PATCH v2 17/17] vm-snapshot-save: add force parameter Pavel Hrdina
2012-12-14 17:24 ` [Qemu-devel] [PATCH v2 00/17] qapi: Convert savevm, loadvm, delvm and info snapshots Luiz Capitulino
2012-12-20 2:27 ` Wenchao Xia
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=20121214144516.782501b1@doriath.home \
--to=lcapitulino@redhat.com \
--cc=phrdina@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).