From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGFiP-0001EA-Mh for qemu-devel@nongnu.org; Thu, 03 Dec 2009 12:43:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGFiL-00018b-OQ for qemu-devel@nongnu.org; Thu, 03 Dec 2009 12:43:41 -0500 Received: from [199.232.76.173] (port=35038 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGFiL-00018E-Ji for qemu-devel@nongnu.org; Thu, 03 Dec 2009 12:43:37 -0500 Received: from mail-qy0-f194.google.com ([209.85.221.194]:51277) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGFiL-00070U-8L for qemu-devel@nongnu.org; Thu, 03 Dec 2009 12:43:37 -0500 Received: by qyk32 with SMTP id 32so646950qyk.4 for ; Thu, 03 Dec 2009 09:43:36 -0800 (PST) Message-ID: <4B17F8C5.2090102@codemonkey.ws> Date: Thu, 03 Dec 2009 11:43:33 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] raw: Use the right host device driver for open/create References: <1259596471-14576-1-git-send-email-kwolf@redhat.com> <20091130205120.GA6053@lst.de> In-Reply-To: <20091130205120.GA6053@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Kevin Wolf , qemu-devel@nongnu.org Christoph Hellwig wrote: > On Mon, Nov 30, 2009 at 04:54:31PM +0100, Kevin Wolf wrote: > >> Users don't expect that they need to specify host_device/cdrom/floppy when >> "creating" an image on a block device or converting with an device as target. >> Currently creating as raw leads to 'Error while formatting' whereas using as >> raw just works. >> >> With this patch raw is accepted for both files and host devices. For devices >> the block driver is transparently changed to host_*. >> > > I agree that we should allow raw to also cover host devices, but I don't > like the implementation very much. Beeing used to specify the format is > pretty much the only reason to have the name in the block driver anyway, > and looking it up in one is a bit of a layering violation. > I agree. > I'd suggest to either allow multiple formats with the same name and > looping over them or some sort of alias property in the block driver to > also match the alias instead. > Regards, Anthony Liguori > >