qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: aliguori@us.ibm.com
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 4/5] savevm: qemu_savevm_state(): Drop stop VM logic
Date: Wed, 19 Oct 2011 10:56:50 -0200	[thread overview]
Message-ID: <1319029011-11706-5-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1319029011-11706-1-git-send-email-lcapitulino@redhat.com>

qemu_savevm_state() has some logic to stop the VM and to (or not to)
resume it. But this seems to be a big noop, as qemu_savevm_state()
is only called by do_savevm() when the VM is already stopped.

So, let's drop qemu_savevm_state()'s stop VM logic.

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 savevm.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/savevm.c b/savevm.c
index bf4d0e7..abb4a60 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1599,12 +1599,8 @@ void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f)
 
 static int qemu_savevm_state(Monitor *mon, QEMUFile *f)
 {
-    int saved_vm_running;
     int ret;
 
-    saved_vm_running = runstate_is_running();
-    vm_stop(RUN_STATE_SAVE_VM);
-
     if (qemu_savevm_state_blocked(mon)) {
         ret = -EINVAL;
         goto out;
@@ -1626,9 +1622,6 @@ out:
     if (qemu_file_has_error(f))
         ret = -EIO;
 
-    if (!ret && saved_vm_running)
-        vm_start();
-
     return ret;
 }
 
-- 
1.7.7.rc3

  parent reply	other threads:[~2011-10-19 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 12:56 [Qemu-devel] [RESEND PULL 0/5]: QMP queue Luiz Capitulino
2011-10-19 12:56 ` [Qemu-devel] [PATCH 1/5] QMP: Fix blockdev-snapshot-sync doc example Luiz Capitulino
2011-10-19 12:56 ` [Qemu-devel] [PATCH 2/5] runstate: Print state transition when invalid Luiz Capitulino
2011-10-19 12:56 ` [Qemu-devel] [PATCH 3/5] runstate: Allow to transition from paused to postmigrate Luiz Capitulino
2011-10-19 12:56 ` Luiz Capitulino [this message]
2011-10-19 12:56 ` [Qemu-devel] [PATCH 5/5] runstate: Allow user to migrate twice Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2011-10-14 17:26 [Qemu-devel] [PULL 0/5]: QMP queue Luiz Capitulino
2011-10-14 17:26 ` [Qemu-devel] [PATCH 4/5] savevm: qemu_savevm_state(): Drop stop VM logic Luiz Capitulino

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=1319029011-11706-5-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.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).