From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7kID-0004vx-QI for qemu-devel@nongnu.org; Wed, 14 Mar 2012 05:15:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7kHo-0004S9-1S for qemu-devel@nongnu.org; Wed, 14 Mar 2012 05:14:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7kHn-0004S2-Pu for qemu-devel@nongnu.org; Wed, 14 Mar 2012 05:14:23 -0400 Message-ID: <4F60623B.1090305@redhat.com> Date: Wed, 14 Mar 2012 10:17:47 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1331056563-7503-1-git-send-email-pbonzini@redhat.com> <1331056563-7503-11-git-send-email-pbonzini@redhat.com> <4F5FB28A.4090605@redhat.com> In-Reply-To: <4F5FB28A.4090605@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 10/10] Add the drive-reopen command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Paolo Bonzini , fsimonce@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com, lcapitulino@redhat.com Am 13.03.2012 21:48, schrieb Eric Blake: > On 03/06/2012 10:56 AM, Paolo Bonzini wrote: >> From: Federico Simoncelli >> >> Signed-off-by: Federico Simoncelli >> Signed-off-by: Paolo Bonzini > >> ## >> +# @drive-reopen >> +# >> +# Assigns a new image file to a device. >> +# >> +# @device: the name of the device for which we are changing the image file. >> +# >> +# @new-image-file: the target of the new image. If the file doesn't exists the >> +# command will fail. >> +# >> +# @format: #optional the format of the new image, default is 'qcow2'. >> +# >> +# Returns: nothing on success >> +# If @device is not a valid block device, DeviceNotFound >> +# If @new-image-file can't be opened, OpenFileFailed >> +# If @format is invalid, InvalidBlockFormat >> +# >> +# Since 1.1 >> +## >> +{ 'command': 'drive-reopen', >> + 'data': { 'device': 'str', 'new-image-file': 'str', '*format': 'str' } } > > I still think we need a 'drive-reopen' action included in 'transaction', > as an 11/10 on this series. If we want to do this, it needs to be the same patch, as we couple the transaction actions with top-level commands as long as there is no other way to discover the possible actions. And it probably makes more sense anyway, because the top-level command would be just a thin wrapper around the transactional one. Only problem is that just moving the code there doesn't make it suitable for a transaction and doing an all-or-nothing drive-reopen isn't quite trivial. Kevin