From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNlJP-0005at-Ms for qemu-devel@nongnu.org; Mon, 06 Jul 2009 06:20:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNlJK-0005ZG-OK for qemu-devel@nongnu.org; Mon, 06 Jul 2009 06:20:38 -0400 Received: from [199.232.76.173] (port=48581 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNlJJ-0005Z2-Ny for qemu-devel@nongnu.org; Mon, 06 Jul 2009 06:20:34 -0400 Received: from verein.lst.de ([213.95.11.210]:43829) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MNlJJ-0007er-BW for qemu-devel@nongnu.org; Mon, 06 Jul 2009 06:20:33 -0400 Date: Mon, 6 Jul 2009 12:20:24 +0200 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] qemu-io: add flag to mark files growable Message-ID: <20090706102023.GA7835@lst.de> References: <20090704155330.GA4825@lst.de> <4A51BBA1.4090307@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A51BBA1.4090307@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Christoph Hellwig , qemu-devel@nongnu.org On Mon, Jul 06, 2009 at 10:53:53AM +0200, Kevin Wolf wrote: > Christoph Hellwig schrieb: > > Add a -g flag to the open command and the main qemu-io command line to > > allow opening a file growable. This is only allowed for protocols, > > mirroring the limitation exposed through bdrv_file_open. > > This limitation doesn't look quite right. I'm not sure if growable > images are used anywhere else, too, but their main usage is for the > image file access in formats like qcow - that is, growable images are > usually raw. And raw didn't have a protocol name until recently. It does have a protocol now, and the way current qemu is implemented growable is only set from bdrv_file_open, which implies the BDRV_O_FILE argument to bdrv_open2, which means we use find_protocol to find the BlockDriver and find_protocol needs protocol_name set. If you want to backport this patch to a qemu version that doesn't have a protocol_name for raw you'll have to adjust it to whatever check is correct in that version.