From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ZCN-0006IR-7N for qemu-devel@nongnu.org; Mon, 05 Mar 2012 09:47:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4ZBy-0002ST-8N for qemu-devel@nongnu.org; Mon, 05 Mar 2012 09:47:38 -0500 Received: from mail-pz0-f46.google.com ([209.85.210.46]:50841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ZBy-0002Rv-2C for qemu-devel@nongnu.org; Mon, 05 Mar 2012 09:47:14 -0500 Received: by dajr28 with SMTP id r28so6500107daj.33 for ; Mon, 05 Mar 2012 06:47:11 -0800 (PST) Message-ID: <4F54D1EA.4060006@codemonkey.ws> Date: Mon, 05 Mar 2012 08:47:06 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1330600908-16202-1-git-send-email-pbonzini@redhat.com> <4F4FE5B7.2080306@codemonkey.ws> <4F547EFA.3020606@redhat.com> In-Reply-To: <4F547EFA.3020606@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/6] Mirrored writes using blockdev-transaction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: stefanha@linux.vnet.ibm.com, jcody@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, fsimonce@redhat.com, Paolo Bonzini , eblake@redhat.com On 03/05/2012 02:53 AM, Kevin Wolf wrote: > Am 01.03.2012 22:10, schrieb Anthony Liguori: >> On 03/01/2012 05:21 AM, Paolo Bonzini wrote: >>> 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" } >> >> We don't have schema introspection today. How would one determine when new >> transaction types are available? >> >> I think we need some sort of introspection method too in order for clients to >> figure out when the command is extended. > > How about coupling the types with independently available commands for > now? We would rename 'snapshot' to 'blockdev-snapshot-sync', which does > the same thing outside of transactions. The mirror patches would then > introduce a 'drive-mirror' top-level command at the same time as they > introduce a 'drive-mirror' transaction type. I think it's reasonable but we need to make sure to document the relationship here explicitly in the schema. Regards, Anthony Liguori > > Kevin