From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LL0KP-0004HC-5w for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:14:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LL0KL-0004Eq-Fc for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:14:00 -0500 Received: from [199.232.76.173] (port=34516 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LL0KL-0004Ec-92 for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:13:57 -0500 Received: from mx1.redhat.com ([66.187.233.31]:58134) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LL0KK-0001gM-W1 for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:13:57 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n08JD8Mv008879 for ; Thu, 8 Jan 2009 14:13:08 -0500 Date: Thu, 8 Jan 2009 19:13:06 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] qemu: block.c: introducing "fmt:FMT:" prefix to image-filenames Message-ID: <20090108191301.GB8669@redhat.com> References: <496642BD.4010706@redhat.com> <20090108185256.GA8669@redhat.com> <49664F54.7050908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49664F54.7050908@redhat.com> Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Uri Lublin Cc: qemu-devel@nongnu.org On Thu, Jan 08, 2009 at 09:09:08PM +0200, Uri Lublin wrote: > Daniel P. Berrange wrote: > >On Thu, Jan 08, 2009 at 08:15:25PM +0200, Uri Lublin wrote: > >>The purpose of this prefix is to > >>1. Provide a way to know the backing file format without probing > >> it (setting the format upon creation time). > >>2. Enable using qcow2 format (and others) over host block devices. > >> (only if the user specifically asks for it). > >> > >>If no fmt:FMT: is provided we go back to probing. > > > >I still don't like the fact that this is inventing a second syntax > >for specifying format that's different to the syntax used for the > >existing -drive parameter, which is > > > > -drive file=/some/path,format=qcow2,....other disk options... > > > >>backing file format is qcow2 (even though it's on a host block device) > >>$ qemu-img create -b fmt:qcow2:/dev/loop0 -f qcow2 /tmp/uuu.qcow2 > > > >I'd prefer to see a '-F' flag to specify format of backing file and > >leave syntax of existing -b arg alone > > > > $ qemu-img create -F qcow2 -b /dev/loop0 -f qcow2 /tmp/uuu.qcow2 > > I can easily modify qemu-img to support -F. > The question is how to represent it such that when we run qemu it "knows" > the backing file format. In other words what will '-F qcow2' do ? In this > solution it will add 'fmt:qcow2:' as a prefix to the backing-file filename. Yes the format you write into the qcow2 header can still use the fmt:qcow2: prefix - just no need to expose that particular qcow2 specific implementation detail on the CLI. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|