Received: from eggs.gnu.org ([2001:4830:134:3::10]:59841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WG3mj-0007Zm-Qi for qemu-devel@nongnu.org; Wed, 19 Feb 2014 04:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WG3md-0006Gn-SI for qemu-devel@nongnu.org; Wed, 19 Feb 2014 04:49:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WG3md-0006Gi-K3 for qemu-devel@nongnu.org; Wed, 19 Feb 2014 04:49:39 -0500 Date: Wed, 19 Feb 2014 10:47:33 +0100 From: Kevin Wolf Message-ID: <20140219094733.GC3613@dhcp-200-207.str.redhat.com> References: <1392744792-9512-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1392744792-9512-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 0/8] block: Integrate bdrv_file_open() into bdrv_open() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , =?iso-8859-1?Q?Beno=EEt?= Canet Am 18.02.2014 um 18:33 hat Max Reitz geschrieben: > bdrv_file_open() is now nearly a subset of bdrv_open(), except for the > fact that bdrv_file_open() is for protocols and bdrv_open() for block > drivers. It is possible to use bdrv_file_open() with a block driver, but > in that case that block driver must be explicitly specified. > > Due to these great similarities, bdrv_file_open() can be integrated and > made a special case of bdrv_open(). If the flag BDRV_O_PROTOCOL is > specified, bdrv_open() will now do what bdrv_file_open() used to do: > Auto-detecting a protocol instead of a block driver. > > This series implements this and changes all calls to bdrv_file_open() to > bdrv_open() calls with BDRV_O_PROTOCOL specified. > > Note that this flag cannot be discerned automatically since it is > impossible for bdrv_open() to know by itself whether a given file should > be opened with or without the format layer involved: Both are valid > alternatives. Therefore, it still has to be specified by the user. Thanks, applied to the block branch. Kevin