qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] block: Split bdrv_open


From: Christoph Hellwig
Subject: [Qemu-devel] Re: [PATCH] block: Split bdrv_open
Date: Tue, 13 Apr 2010 20:20:33 +0200
User-agent: Mutt/1.3.28i

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 <address@hidden>
> ---
> 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

[Prev in Thread] Current Thread [Next in Thread]