From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCU7J-0002h2-Cp for qemu-devel@nongnu.org; Thu, 22 Aug 2013 08:36:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCU7E-0003dT-74 for qemu-devel@nongnu.org; Thu, 22 Aug 2013 08:35:57 -0400 Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]:65146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCU7E-0003dN-1W for qemu-devel@nongnu.org; Thu, 22 Aug 2013 08:35:52 -0400 Received: by mail-ee0-f44.google.com with SMTP id b47so888533eek.17 for ; Thu, 22 Aug 2013 05:35:51 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5216057B.7040602@redhat.com> Date: Thu, 22 Aug 2013 14:35:07 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1376307710-15641-1-git-send-email-alex@alex.org.uk> <20130822114513.GC27613@stefanha-thinkpad.redhat.com> In-Reply-To: <20130822114513.GC27613@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv4] add qemu-img convert -C option (skip target volume creation) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Alexandre Derumier , Fam Zheng , qemu-devel@nongnu.org, Alex Bligh Il 22/08/2013 13:45, Stefan Hajnoczi ha scritto: > On Mon, Aug 12, 2013 at 12:41:50PM +0100, Alex Bligh wrote: >> > From: Alexandre Derumier >> > >> > Add a -C option to skip volume creation on qemu-img convert. >> > This is useful for targets such as rbd / ceph, where the >> > target volume may already exist; we cannot always rely on >> > qemu-img convert to create the image, as dependent on the >> > output format, there may be parameters which are not possible >> > to specify through the qemu-img convert command line. >> > >> > Signed-off-by: Alexandre Derumier >> > Signed-off-by: Alex Bligh >> > --- >> > qemu-img-cmds.hx | 4 ++-- >> > qemu-img.c | 39 ++++++++++++++++++++++++--------------- >> > qemu-img.texi | 15 ++++++++++++++- >> > 3 files changed, 40 insertions(+), 18 deletions(-) > Looks good but please include a new qemu-iotest test case that checks: > > 1. Error if the target volume does not exist. > > 2. Success if a correctly sized target volume exists. > > 3. ?? if an incorrectly sized target volume exists. > > ...and anything else you feel is worth testing. > > I recommend keeping the test volume size small so the test case can > execute quickly. 1 MB should be fine for raw or qcow2 images. Also, this is the same as some HMP commands' "-n" option (live snapshots, mirroring, backup) so I suggest to use that name. Paolo