From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, Ian Main <imain@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
dietmar@proxmox.com
Subject: Re: [Qemu-devel] [PATCH 0/3] block: block-backup live backup command
Date: Sat, 27 Apr 2013 13:37:07 +0800 [thread overview]
Message-ID: <517B6403.5020100@linux.vnet.ibm.com> (raw)
In-Reply-To: <1366734308-11724-1-git-send-email-stefanha@redhat.com>
于 2013-4-24 0:25, Stefan Hajnoczi 写道:
> This series adds a new QMP command, block-backup, which takes a point-in-time
> snapshot of a block device. The snapshot is copied out to a target block
> device. A simple example is:
>
> block-backup device=virtio0 format=qcow2 target=backup-20130401.qcow2
>
> The original block-backup blockjob was written by Dietmar Maurer
> <dietmar@proxmox.com>. He is currently busy but I feel the feature is worth
> pushing into QEMU since there has been interest. This is my version of his
> patch, plus the QMP command and qemu-iotests test case.
>
> How is this different from block-stream and drive-mirror?
> ---------------------------------------------------------
> Both block-stream and drive-mirror do not provide immediate point-in-time
> snapshots. Instead they copy data into a new file and then switch to it. In
> other words, the point at which the "snapshot" is taken cannot be controlled
> directly.
>
> block-backup intercepts guest writes and saves data into the target block
> device before it is overwritten. The target block device can be a raw image
> file, backing files are not used to implement this feature.
>
Besides, compared to snapshot-blkdev, it mainly brings better
performance by avoid merging later, however, other tool may
be needed to form an incremental backup, which may be not related to
this patch.
No objection to this patch, but perhaps a better way is using
internal snapshot by adding base/delta data export support.
> How can block-backup be used?
> -----------------------------
> The simplest use-case is to copy a point-in-time snapshot to a local file.
>
> More advanced users may wish to make the target an NBD URL. The NBD server
> listening on the other side can process the backup writes any way it wishes. I
> previously posted an RFC series with a backup server that streamed Dietmar's
> VMA backup archive format.
>
> What's next for block-backup?
> -----------------------------
> The following enhancements are left for future patches:
>
> 1. QMP 'transaction' support. It is handy to atomically snapshot multiple
> block devices. We need qmp_transaction() support for this. Wenchao Xia is
> currently making qmp_transaction() extensible so new action types, like
> block-backup, can be added.
>
> 2. Sync modes like drive-mirror (top, full, none). This makes it possible to
> preserve the backing file chain.
>
> Dietmar Maurer (1):
> block: add basic backup support to block driver
>
> Stefan Hajnoczi (2):
> block: add block_backup QMP command
> qemu-iotests: add 054 block-backup test case
>
> block.c | 69 ++++++++++++-
> block/Makefile.objs | 1 +
> block/backup.c | 252 +++++++++++++++++++++++++++++++++++++++++++++
> blockdev.c | 92 +++++++++++++++++
> include/block/block.h | 2 +
> include/block/block_int.h | 16 +++
> include/block/blockjob.h | 10 ++
> qapi-schema.json | 28 +++++
> qmp-commands.hx | 6 ++
> tests/qemu-iotests/054 | 230 +++++++++++++++++++++++++++++++++++++++++
> tests/qemu-iotests/054.out | 5 +
> tests/qemu-iotests/group | 1 +
> 12 files changed, 707 insertions(+), 5 deletions(-)
> create mode 100644 block/backup.c
> create mode 100755 tests/qemu-iotests/054
> create mode 100644 tests/qemu-iotests/054.out
>
--
Best Regards
Wenchao Xia
next prev parent reply other threads:[~2013-04-27 5:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 16:25 [Qemu-devel] [PATCH 0/3] block: block-backup live backup command Stefan Hajnoczi
2013-04-23 16:25 ` [Qemu-devel] [PATCH 1/3] block: add basic backup support to block driver Stefan Hajnoczi
2013-04-23 16:25 ` [Qemu-devel] [PATCH 2/3] block: add block_backup QMP command Stefan Hajnoczi
2013-04-26 22:52 ` Eric Blake
2013-04-26 22:53 ` Eric Blake
2013-04-26 22:58 ` Eric Blake
2013-04-29 7:21 ` Stefan Hajnoczi
2013-04-29 9:27 ` Paolo Bonzini
2013-04-29 15:51 ` Eric Blake
2013-05-01 11:55 ` Stefan Hajnoczi
2013-04-23 16:25 ` [Qemu-devel] [PATCH 3/3] qemu-iotests: add 054 block-backup test case Stefan Hajnoczi
2013-04-23 16:49 ` [Qemu-devel] [PATCH 0/3] block: block-backup live backup command Eric Blake
2013-04-23 16:57 ` Paolo Bonzini
2013-04-24 7:41 ` Stefan Hajnoczi
2013-04-24 12:44 ` Eric Blake
2013-04-27 5:37 ` Wenchao Xia [this message]
2013-04-29 7:22 ` 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=517B6403.5020100@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=dietmar@proxmox.com \
--cc=famz@redhat.com \
--cc=imain@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).