qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] Mirrored writes using blockdev-transaction
@ 2012-02-29 13:37 Paolo Bonzini
  2012-02-29 13:37 ` [Qemu-devel] [PATCH 1/6] fix format name for backing file Paolo Bonzini
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Paolo Bonzini @ 2012-02-29 13:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, fsimonce, eblake, stefanha, jcody

This implements all ingredients to establish mirrored writes.
The drive-reopen command that is used to terminate mirrored writes
is not included in this series.

Tested with the following scenarios:

a) mirror only

1) create base.qcow2 and start QEMU with it

2) Execute the following QMP command

{ "execute": "qmp_capabilities" }
{ "execute": "blockdev-transaction", "arguments":
  {'actions': [
    { 'type': 'mirror', 'data' :
      { 'device': 'ide0-hd0', 'target': '/home/pbonzini/mirror.qcow2' } } ] } }
{ "execute": "cont" }

3) hibernate the guest (this requires an IDE disk and -cpu kvm64,-kvmclock)

4) restart the guest with mirror.qcow2


b) atomic snapshot+mirror

1) start QEMU with an existing image test.img

2) Execute the following QMP command

{ "execute": "qmp_capabilities" }
{ "execute": "blockdev-transaction", "arguments":
  {'actions': [
    { 'type': 'snapshot', 'data' :
      { 'device': 'ide0-hd0', 'snapshot-file': '/home/pbonzini/base.qcow2' } },
    { 'type': 'mirror', 'data' :
      { 'device': 'ide0-hd0', 'target': '/home/pbonzini/mirror.qcow2' } } ] } }
{ "execute": "cont" }

3) hibernate the guest (this requires an IDE disk and -cpu kvm64,-kvmclock)

4) check that mirror.qcow2 has test.img as the base

5) restart the guest with base.qcow2

6) restart the guest with mirror.qcow2



Marcelo Tosatti (1):
  Add blkmirror block driver

Paolo Bonzini (5):
  fix format name for backing file
  qapi: complete implementation of unions
  rename blockdev-group-snapshot-sync
  add reuse field
  add mirroring to blockdev-transaction

 Makefile.objs             |    2 +-
 block/blkmirror.c         |  153 +++++++++++++++++++++++++++++++++++++++++++++
 blockdev.c                |  111 +++++++++++++++++++++-----------
 docs/blkmirror.txt        |   16 +++++
 qapi-schema-test.json     |   10 +++
 qapi-schema.json          |   51 ++++++++++++---
 qmp-commands.hx           |   66 +++++++++++++-------
 scripts/qapi-types.py     |    5 ++
 scripts/qapi-visit.py     |   31 +++++++++-
 test-qmp-input-visitor.c  |   19 ++++++
 test-qmp-output-visitor.c |   35 ++++++++++
 11 files changed, 426 insertions(+), 73 deletions(-)
 create mode 100644 block/blkmirror.c
 create mode 100644 docs/blkmirror.txt

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-03-01 13:34 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 13:37 [Qemu-devel] [PATCH 0/6] Mirrored writes using blockdev-transaction Paolo Bonzini
2012-02-29 13:37 ` [Qemu-devel] [PATCH 1/6] fix format name for backing file Paolo Bonzini
2012-02-29 13:37 ` [Qemu-devel] [PATCH 2/6] qapi: complete implementation of unions Paolo Bonzini
2012-02-29 13:37 ` [Qemu-devel] [PATCH 3/6] rename blockdev-group-snapshot-sync Paolo Bonzini
2012-02-29 14:25   ` Paolo Bonzini
2012-02-29 15:08     ` Luiz Capitulino
2012-02-29 15:23       ` Paolo Bonzini
2012-03-01 13:30         ` Luiz Capitulino
2012-03-01 13:33           ` Paolo Bonzini
2012-02-29 18:41   ` Eric Blake
2012-03-01 10:18     ` Paolo Bonzini
2012-02-29 13:37 ` [Qemu-devel] [PATCH 4/6] add reuse field Paolo Bonzini
2012-02-29 18:50   ` Eric Blake
2012-03-01 10:22     ` Kevin Wolf
2012-02-29 13:37 ` [Qemu-devel] [PATCH 5/6] Add blkmirror block driver Paolo Bonzini
2012-02-29 14:37   ` Stefan Hajnoczi
2012-02-29 14:56     ` Paolo Bonzini
2012-02-29 19:36   ` Eric Blake
2012-02-29 13:37 ` [Qemu-devel] [PATCH 6/6] add mirroring to blockdev-transaction Paolo Bonzini
2012-02-29 19:47   ` Eric Blake
2012-03-01  6:46     ` Paolo Bonzini

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).