From: Pavel Hrdina <phrdina@redhat.com>
To: qemu-devel@nongnu.org
Cc: Pavel Hrdina <phrdina@redhat.com>,
phrdina@redhat.c0m, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH 03/13] savevm: add error parameter to qemu_savevm_state_begin()
Date: Wed, 9 Jan 2013 16:17:57 +0100 [thread overview]
Message-ID: <8c061da39c66e080c8c4bd317b36b6ecd0a42a11.1357741229.git.phrdina@redhat.com> (raw)
In-Reply-To: <cover.1357741229.git.phrdina@redhat.com>
In-Reply-To: <cover.1357741229.git.phrdina@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
include/sysemu/sysemu.h | 3 ++-
migration.c | 2 +-
savevm.c | 7 +++++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 28a783e..e50f990 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/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);
diff --git a/migration.c b/migration.c
index c69e864..cb38867 100644
--- a/migration.c
+++ b/migration.c
@@ -678,7 +678,7 @@ static bool migrate_fd_put_ready(MigrationState *s, uint64_t max_size)
if (s->first_time) {
s->first_time = false;
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 fae0cba..e2ecb0b 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1557,7 +1557,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;
@@ -1598,11 +1599,13 @@ int qemu_savevm_state_begin(QEMUFile *f,
ret = se->ops->save_live_setup(f, se->opaque);
if (ret < 0) {
qemu_savevm_state_cancel(f);
+ error_setg(errp, "Failed to begin vmstate save.");
return ret;
}
}
ret = qemu_file_get_error(f);
if (ret != 0) {
+ error_setg_errno(errp, errno, "Failed to begin vmstate save.");
qemu_savevm_state_cancel(f);
}
@@ -1758,7 +1761,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;
--
1.8.1
next prev parent reply other threads:[~2013-01-09 15:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-09 15:17 [Qemu-devel] [PATCH 00/13] convert savevm to use qapi and introduce qmp command Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 01/13] block: add error parameter to bdrv_snapshot_create() and related functions Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 02/13] block: add error parameter to del_existing_snapshots() Pavel Hrdina
2013-01-09 15:17 ` Pavel Hrdina [this message]
2013-01-09 15:17 ` [Qemu-devel] [PATCH 04/13] savevm: add error parameter to qemu_savevm_state_iterate() Pavel Hrdina
2013-01-09 15:17 ` [Qemu-devel] [PATCH 05/13] savevm: add error parameter to qemu_savevm_state_complete() Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 06/13] savevm: add error parameter to qemu_savevm_state() Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 07/13] qapi: Convert savevm Pavel Hrdina
2013-01-09 22:32 ` Eric Blake
2013-01-10 5:50 ` Wenchao Xia
2013-01-09 15:18 ` [Qemu-devel] [PATCH 08/13] qemu-img: introduce qemu_img_handle_error Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 09/13] block: update return value from bdrv_snapshot_create Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 10/13] savevm: update return value from qemu_savevm_state_begin Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 11/13] savevm: update return value from qemu_savevm_state_complete Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 12/13] savevm: update return value from qemu_savevm_state Pavel Hrdina
2013-01-09 22:39 ` Eric Blake
2013-01-10 10:35 ` Pavel Hrdina
2013-01-09 15:18 ` [Qemu-devel] [PATCH 13/13] vm-snapshot-save: add force parameter Pavel Hrdina
2013-01-09 22:47 ` Eric Blake
2013-01-10 11:54 ` Pavel Hrdina
2013-01-09 15:34 ` [Qemu-devel] [PATCH 00/13] convert savevm to use qapi and introduce qmp command Pavel Hrdina
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=8c061da39c66e080c8c4bd317b36b6ecd0a42a11.1357741229.git.phrdina@redhat.com \
--to=phrdina@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=phrdina@redhat.c0m \
--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).