Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nz68X-0000Vp-QE for qemu-devel@nongnu.org; Tue, 06 Apr 2010 06:36:01 -0400 Received: from [140.186.70.92] (port=42759 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nz68V-0000V0-R6 for qemu-devel@nongnu.org; Tue, 06 Apr 2010 06:36:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nz68T-00071P-1g for qemu-devel@nongnu.org; Tue, 06 Apr 2010 06:35:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1227) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz68S-0006xS-Pa for qemu-devel@nongnu.org; Tue, 06 Apr 2010 06:35:57 -0400 From: Juan Quintela In-Reply-To: <20100405145357.GA25954@lst.de> (Christoph Hellwig's message of "Mon, 5 Apr 2010 16:53:57 +0200") References: <20100405145357.GA25954@lst.de> Date: Tue, 06 Apr 2010 12:35:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH]: block: get rid of the BDRV_O_FILE flag List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org Christoph Hellwig wrote: > BDRV_O_FILE is only used to communicate between bdrv_file_open and bdrv_open. > It affects two things: first bdrv_open only searches for protocols using > find_protocol instead of all image formats and host drivers. We can easily > move that to the caller and pass the found driver to bdrv_open. Second > it is used to not force a read-write open of a snapshot file. But we never > use bdrv_file_open to open snapshots and this behaviour doesn't make sense > to start with. > > qemu-io abused the BDRV_O_FILE for it's growable option, switch it to > using bdrv_file_open to make sure we only open files as growable were > we can actually support that. > > This patch requires Kevin's "[PATCH] Replace calls of old bdrv_open" to > be applied first. > > Signed-off-by: Christoph Hellwig Acked-by: Juan Quintela