qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, lvivier@redhat.com, peterx@redhat.com
Subject: [Qemu-devel] [PULL 07/10] monitor: Move hmp_delvm from savevm.c to hmp.c
Date: Thu,  4 May 2017 11:40:50 +0200	[thread overview]
Message-ID: <20170504094053.2329-8-quintela@redhat.com> (raw)
In-Reply-To: <20170504094053.2329-1-quintela@redhat.com>

It really uses block/* stuff, not migration one.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hmp.c                   | 13 +++++++++++++
 hmp.h                   |  1 +
 include/sysemu/sysemu.h |  1 -
 migration/savevm.c      | 13 -------------
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/hmp.c b/hmp.c
index a82a952..bb739ce 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1286,6 +1286,19 @@ void hmp_savevm(Monitor *mon, const QDict *qdict)
     save_vmstate(qdict_get_try_str(qdict, "name"));
 }
 
+void hmp_delvm(Monitor *mon, const QDict *qdict)
+{
+    BlockDriverState *bs;
+    Error *err;
+    const char *name = qdict_get_str(qdict, "name");
+
+    if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
+        error_reportf_err(err,
+                          "Error while deleting snapshot on device '%s': ",
+                          bdrv_get_device_name(bs));
+    }
+}
+
 void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
 {
     qmp_migrate_cancel(NULL);
diff --git a/hmp.h b/hmp.h
index b302c8d..6a402b1 100644
--- a/hmp.h
+++ b/hmp.h
@@ -65,6 +65,7 @@ void hmp_drive_mirror(Monitor *mon, const QDict *qdict);
 void hmp_drive_backup(Monitor *mon, const QDict *qdict);
 void hmp_loadvm(Monitor *mon, const QDict *qdict);
 void hmp_savevm(Monitor *mon, const QDict *qdict);
+void hmp_delvm(Monitor *mon, const QDict *qdict);
 void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
 void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 914c36c..e4f355ceb 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -77,7 +77,6 @@ void qemu_remove_machine_init_done_notifier(Notifier *notify);
 
 int save_vmstate(const char *name);
 int load_vmstate(const char *name);
-void hmp_delvm(Monitor *mon, const QDict *qdict);
 void hmp_info_snapshots(Monitor *mon, const QDict *qdict);
 
 void qemu_announce_self(void);
diff --git a/migration/savevm.c b/migration/savevm.c
index 8345255..9e0bd9d 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2304,19 +2304,6 @@ int load_vmstate(const char *name)
     return 0;
 }
 
-void hmp_delvm(Monitor *mon, const QDict *qdict)
-{
-    BlockDriverState *bs;
-    Error *err;
-    const char *name = qdict_get_str(qdict, "name");
-
-    if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
-        error_reportf_err(err,
-                          "Error while deleting snapshot on device '%s': ",
-                          bdrv_get_device_name(bs));
-    }
-}
-
 void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
 {
     BlockDriverState *bs, *bs1;
-- 
2.9.3

  parent reply	other threads:[~2017-05-04  9:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04  9:40 [Qemu-devel] [PULL 00/10] Migration PULL requset Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 01/10] ram: Split dirty bitmap by RAMBlock Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 02/10] migration: setup bi-directional I/O channel for exec: protocol Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 03/10] migration: to_dst_file at that point is NULL Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 04/10] monitor: Remove monitor parameter from save_vmstate Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 05/10] monitor: Move hmp_loadvm from monitor.c to hmp.c Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 06/10] monitor: Move hmp_savevm from savevm.c " Juan Quintela
2017-05-04  9:40 ` Juan Quintela [this message]
2017-05-04  9:40 ` [Qemu-devel] [PULL 08/10] monitor: Move hmp_info_snapshots " Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 09/10] migration: Move postcopy-ram.h to migration/ Juan Quintela
2017-05-04  9:40 ` [Qemu-devel] [PULL 10/10] migration: Extra tracing Juan Quintela
2017-05-05 15:54 ` [Qemu-devel] [PULL 00/10] Migration PULL requset Stefan Hajnoczi

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=20170504094053.2329-8-quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@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).