From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2PfL-0006Or-PL for qemu-devel@nongnu.org; Tue, 28 Feb 2012 11:12:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2PfF-0000cS-E2 for qemu-devel@nongnu.org; Tue, 28 Feb 2012 11:12:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2PfF-0000cK-6A for qemu-devel@nongnu.org; Tue, 28 Feb 2012 11:12:33 -0500 Message-ID: <4F4CFCE9.7040401@redhat.com> Date: Tue, 28 Feb 2012 17:12:25 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <87r4xg1n5g.fsf@elfo.elfo> <4F4BBBA8.3020105@redhat.com> <4F4BFC9A.1020300@redhat.com> <4F4BFE4D.8000409@codemonkey.ws> <4F4CE8FB.8080404@redhat.com> <4F4CFBB7.9060707@redhat.com> In-Reply-To: <4F4CFBB7.9060707@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] blockdev operations [was: KVM call agenda for Tuesday 28th] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: KVM devel mailing list , Stefan Hajnoczi , Jeff Cody , Developers qemu-devel , Federico Simoncelli , quintela@trasno.org, Anthony Liguori Il 28/02/2012 17:07, Eric Blake ha scritto: > { 'enum': 'BlockdevOp', > 'data': [ 'snapshot', 'snapshot-mirror', 'reopen' ] } > { 'type': 'BlockdevAction', > 'data': {'device': 'str', 'op': 'BlockdevOp', > 'file': 'str', '*format': 'str', '*reuse': 'bool', > '*mirror': 'str', '*mirror-format': 'str' } } > { 'command': 'blkdev-group-action-sync', > 'data': { 'actionlist': [ 'BlockdevAction' ] } } > > > The overall command is atomic - either all operations will succeed, or > the command returns an error pointing to the name of the device that > failed leaving all devices in their pre-command state. Then, for each > requested operation: > > If op is 'snapshot', then 'file' names the new snapshot file; 'reuse' is > optional (defaults to false) to say whether qemu creates the file from > scratch, or opens an existing file with the backing file already > populated correctly. 'format' gives the format of 'file', defaulting to > qcow2. 'mirror' and 'mirror-format' must not be given. > > If op is 'snapshot-mirror', then 'mirror' is mandatory; and both 'file' > and 'mirror' are opened as a new mirrored snapshot. Again, 'reuse' > affects whether qemu creates the new files from scratch or trusts oVirt > to pre-create both files with backing file information; and 'format' and > 'mirror-format' allow control over the image format being opened. Could snapshot-mirror be done as two separate commands for snapshot (or reopen) and mirror? This removes the need for mirror and mirror-format. > If op is 'reopen', then 'file' is the name of the file to be opened to > replace the current file tied to the blockdev, with type given by > 'format'. 'reuse', 'mirror', and 'mirror-format' must not be given. Otherwise looks good. Paolo