qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 00/11] add internal snapshot support at block device


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH 00/11] add internal snapshot support at block device level
Date: Sat, 8 Jun 2013 14:57:56 +0800

  This series brings internal snapshot support at block devices level, now we
have two main methods to do snapshot: 1) backing chain and 2) internal one, and
3) Stefan's unmerged backing up approach. Compared with 1), internal snapshot
is faster in R/W/Delete. Compared with 3), it complete faster, take less space
in total, but take more space in local image. As a summary, When user want to
take a local snapshot quickly, it is encouraged to use internal snapshot when
possible for performance reason. If user want to duplicate or backup vm to
another place, it is encouraged to use backing up approach.

  A full view may be: it can take snapshot by 1), 2), and the snapshot can
be exported to 3rd place. it can also directly export/backup data by 3).
export means transfering the data out of qemu/libvirt's scope, let 3rd party
take over.

host A                       backup server B
 vm         --------->
  |           backup
 \|/                     Data that can distinguish base/delta, disk/memory 
snapshot v0   export
snapshot v1 --------->

Next steps to better full VM snapshot:
  Add support to export internal snapshot data lively, possible use qemu-img
or qemu-nbd.
  Better vmstate saving.

Note:
  I think in most case, saving vmstate in an standalone file is better than
saving it inside qcow2, So suggest treat internal snapshot as block level
methods and not encourage user to savevm in qcow2 any more. We can
have "internal snapshot (or backing chain) + standing alone vmstate file" as
replacement.  


Some details:
  To avoid trouble, this serial have hide ID in interfaces, this make sure
no chaos of ID and name will be introduced by these interfaces.
  There is one patch may be common to Pavel's savvm transaction, patch 4/11,
others are not quite related. Patch 4/11 will not set errp when no snapshot
find, since patch 7/11 need to distinguish real error case.

Thanks Kevin to give advancement about how add it in qmp_transaction, oldest
version comes drom Dietmar Maurer.

Stefan Hajnoczi (3):
  1 blockdev: drop redundant proto_drv check
  2 blockdev: rename BlkTransactionStates to singular
  3 blockdev: allow BdrvActionOps->commit() to be NULL

Wenchao Xia (8):
  4 snapshot: new function bdrv_snapshot_find_by_id_and_name()
  5 snapshot: add paired functions for internal snapshot id and name
  6 snapshot: distinguish id and name in snapshot delete
  7 qmp: add internal snapshot support in qmp_transaction
  8 qmp: add interface blockdev-snapshot-internal-sync
  9 qmp: add interface blockdev-snapshot-delete-internal-sync
  10 hmp: add interface hmp_snapshot_internal_blkdev
  11 hmp: add interface hmp_snapshot_delete_internal_blkdev

 block/qcow2-snapshot.c    |   55 +++++++---
 block/qcow2.h             |    5 +-
 block/rbd.c               |   19 +++-
 block/sheepdog.c          |    5 +-
 block/snapshot.c          |  143 +++++++++++++++++++++++-
 blockdev.c                |  278 ++++++++++++++++++++++++++++++++++-----------
 hmp-commands.hx           |   43 +++++++-
 hmp.c                     |   20 ++++
 hmp.h                     |    2 +
 include/block/block_int.h |    5 +-
 include/block/snapshot.h  |   14 ++-
 qapi-schema.json          |   56 +++++++++
 qemu-img.c                |    5 +-
 qmp-commands.hx           |   93 ++++++++++++++-
 savevm.c                  |   10 ++-
 15 files changed, 649 insertions(+), 104 deletions(-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]