aboutsummaryrefslogtreecommitdiff
path: root/block/snapshot.c
diff options
context:
space:
mode:
authorWenchao Xia <xiawenc@linux.vnet.ibm.com>2013-12-04 17:10:55 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2013-12-04 15:19:00 +0100
commit8c116b0e4141400f8d43a7e6dac8ff3adcc8aadd (patch)
tree758e8c14c3f45d51d1561d5bb5d2c72b7a35f0f7 /block/snapshot.c
parent7b4c4781e390a041fa0ef70817678f1b97fc6db6 (diff)
qemu-nbd: support internal snapshot export
Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/snapshot.c')
-rw-r--r--block/snapshot.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/block/snapshot.c b/block/snapshot.c
index 565222e24a..9047f8ddc9 100644
--- a/block/snapshot.c
+++ b/block/snapshot.c
@@ -25,6 +25,24 @@
#include "block/snapshot.h"
#include "block/block_int.h"
+QemuOptsList internal_snapshot_opts = {
+ .name = "snapshot",
+ .head = QTAILQ_HEAD_INITIALIZER(internal_snapshot_opts.head),
+ .desc = {
+ {
+ .name = SNAPSHOT_OPT_ID,
+ .type = QEMU_OPT_STRING,
+ .help = "snapshot id"
+ },{
+ .name = SNAPSHOT_OPT_NAME,
+ .type = QEMU_OPT_STRING,
+ .help = "snapshot name"
+ },{
+ /* end of list */
+ }
+ },
+};
+
int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
const char *name)
{