From: Pavel Hrdina <phrdina@redhat.com>
To: qemu-devel@nongnu.org
Cc: phrdina@redhat.com, armbru@redhat.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH v4 05/11] savevm: add error parameter to qemu_savevm_state_complete()
Date: Fri, 29 Mar 2013 15:12:32 +0100 [thread overview]
Message-ID: <e8ecd237e473f6b881dba87a5009f780e87e483c.1364565637.git.phrdina@redhat.com> (raw)
In-Reply-To: <cover.1364565637.git.phrdina@redhat.com>
In-Reply-To: <cover.1364565637.git.phrdina@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
include/sysemu/sysemu.h | 2 +-
migration.c | 2 +-
savevm.c | 5 +++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index af4f699..9e6a4a9 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -77,7 +77,7 @@ void qemu_savevm_state_begin(QEMUFile *f,
const MigrationParams *params,
Error **errp);
int qemu_savevm_state_iterate(QEMUFile *f, Error **errp);
-void qemu_savevm_state_complete(QEMUFile *f);
+void qemu_savevm_state_complete(QEMUFile *f, Error **errp);
void qemu_savevm_state_cancel(void);
uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size);
int qemu_loadvm_state(QEMUFile *f);
diff --git a/migration.c b/migration.c
index e9d2f40..c891a45 100644
--- a/migration.c
+++ b/migration.c
@@ -525,7 +525,7 @@ static void *migration_thread(void *opaque)
old_vm_running = runstate_is_running();
vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
qemu_file_set_rate_limit(s->file, INT_MAX);
- qemu_savevm_state_complete(s->file);
+ qemu_savevm_state_complete(s->file, NULL);
qemu_mutex_unlock_iothread();
if (!qemu_file_get_error(s->file)) {
migrate_finish_set_state(s, MIG_STATE_COMPLETED);
diff --git a/savevm.c b/savevm.c
index 575f1b2..7598934 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1823,7 +1823,7 @@ int qemu_savevm_state_iterate(QEMUFile *f, Error **errp)
return ret;
}
-void qemu_savevm_state_complete(QEMUFile *f)
+void qemu_savevm_state_complete(QEMUFile *f, Error **errp)
{
SaveStateEntry *se;
int ret;
@@ -1848,6 +1848,7 @@ void qemu_savevm_state_complete(QEMUFile *f)
trace_savevm_section_end(se->section_id);
if (ret < 0) {
qemu_file_set_error(f, ret);
+ error_setg(errp, "failed to complete vmstate save");
return;
}
}
@@ -1933,7 +1934,7 @@ static int qemu_savevm_state(QEMUFile *f)
ret = qemu_file_get_error(f);
if (ret == 0) {
- qemu_savevm_state_complete(f);
+ qemu_savevm_state_complete(f, NULL);
ret = qemu_file_get_error(f);
}
if (ret != 0) {
--
1.8.1.4
next prev parent reply other threads:[~2013-03-29 14:12 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 14:12 [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command Pavel Hrdina
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 01/11] block: add error parameter to bdrv_snapshot_create() and related functions Pavel Hrdina
2013-04-09 13:13 ` Markus Armbruster
2013-04-09 13:43 ` Kevin Wolf
2013-04-09 16:21 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 02/11] block: add error parameter to del_existing_snapshots() Pavel Hrdina
2013-04-09 13:27 ` Markus Armbruster
2013-04-09 14:14 ` Luiz Capitulino
2013-04-10 9:57 ` Pavel Hrdina
2013-04-10 11:33 ` Markus Armbruster
2013-04-10 12:06 ` Eric Blake
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 03/11] savevm: add error parameter to qemu_savevm_state_begin() Pavel Hrdina
2013-04-09 13:34 ` Markus Armbruster
2013-04-09 13:37 ` Markus Armbruster
2013-04-09 13:47 ` Pavel Hrdina
2013-04-09 13:49 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 04/11] savevm: add error parameter to qemu_savevm_state_iterate() Pavel Hrdina
2013-04-09 13:41 ` Markus Armbruster
2013-03-29 14:12 ` Pavel Hrdina [this message]
2013-04-09 13:56 ` [Qemu-devel] [PATCH v4 05/11] savevm: add error parameter to qemu_savevm_state_complete() Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 06/11] savevm: add error parameter to qemu_savevm_state() Pavel Hrdina
2013-04-09 14:00 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 07/11] qapi: Convert savevm Pavel Hrdina
2013-03-29 16:12 ` Eric Blake
2013-03-29 16:21 ` Pavel Hrdina
2013-04-09 16:04 ` Markus Armbruster
2013-04-09 16:12 ` Eric Blake
2013-04-09 17:23 ` Markus Armbruster
2013-04-09 17:46 ` Eric Blake
2013-04-10 8:01 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 08/11] qemu-img: introduce qemu_img_handle_error Pavel Hrdina
2013-04-09 16:10 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 09/11] block: update return value from bdrv_snapshot_create Pavel Hrdina
2013-04-09 16:29 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 10/11] savevm: update return value from qemu_savevm_state Pavel Hrdina
2013-04-09 16:32 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 11/11] savevm: add force parameter to HMP command and return snapshot info Pavel Hrdina
2013-04-09 16:45 ` Markus Armbruster
2013-04-10 8:18 ` [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command Markus Armbruster
2013-04-10 10:53 ` Pavel Hrdina
2013-04-10 12:24 ` Eric Blake
2013-04-10 12:40 ` Luiz Capitulino
2013-04-10 12:49 ` Eric Blake
2013-04-10 13:22 ` Pavel Hrdina
2013-04-10 13:32 ` Luiz Capitulino
2013-04-10 13:50 ` Pavel Hrdina
2013-04-10 14:05 ` Pavel Hrdina
2013-04-10 17:15 ` Eric Blake
2013-04-10 17:33 ` Pavel Hrdina
2013-04-17 2:48 ` Wenchao Xia
2013-04-11 9:20 ` Markus Armbruster
2013-04-15 12:10 ` Kevin Wolf
2013-04-15 13:16 ` Eric Blake
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=e8ecd237e473f6b881dba87a5009f780e87e483c.1364565637.git.phrdina@redhat.com \
--to=phrdina@redhat.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@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).