On Mon, Apr 12, 2010 at 04:49:16PM +0200, Kevin Wolf wrote:
> bdrv_open contains quite some code that is only useful for opening images (as
> opposed to opening files by a protocol), for example snapshots.
> 
> This patch splits the code so that we have bdrv_open_file() for files (uses
> protocols), bdrv_open() for images (uses format drivers) and bdrv_do_open() 
> for
> the code common for opening both images and files.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
> This patch applies on top of Christoph's RFC for the format/protocol split

I like this a lot.  A few comments:

 - why is bdrv_do_open below it's users in the code?  I really hate
   forward declarations of functions and they can usually be easily
   avoided.
 - a "do" a function name is not very meaningfull - what about
   bdrv_open_common instead?
 - doesn't the backing device handling only apply to image formats, too?



Reply via email to