From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCTKM-00025u-Uy for qemu-devel@nongnu.org; Thu, 22 Aug 2013 07:45:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCTKI-0000HW-0w for qemu-devel@nongnu.org; Thu, 22 Aug 2013 07:45:22 -0400 Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:62561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCTKH-0000HP-Qf for qemu-devel@nongnu.org; Thu, 22 Aug 2013 07:45:17 -0400 Received: by mail-ee0-f54.google.com with SMTP id e53so872201eek.27 for ; Thu, 22 Aug 2013 04:45:17 -0700 (PDT) Date: Thu, 22 Aug 2013 13:45:13 +0200 From: Stefan Hajnoczi Message-ID: <20130822114513.GC27613@stefanha-thinkpad.redhat.com> References: <1376307710-15641-1-git-send-email-alex@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1376307710-15641-1-git-send-email-alex@alex.org.uk> 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: Alex Bligh Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Alexandre Derumier 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. Stefan