qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH 2/6] block: Add options QDict to bdrv_open()


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH 2/6] block: Add options QDict to bdrv_open() prototype
Date: Thu, 28 Feb 2013 11:39:28 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Feb 27, 2013 at 06:25:51PM +0100, Kevin Wolf wrote:
> @@ -780,15 +788,28 @@ int bdrv_open_backing_file(BlockDriverState *bs)
>  
>  /*
>   * Opens a disk image (raw, qcow2, vmdk, ...)
> + *
> + * options is a QDict of options to pass to the block drivers, or NULL for an
> + * empty set of options. The reference to the QDict belongs to the block 
> layer
> + * after the call, so if the caller intends to reuse the dictionary, it needs
> + * to use QINCREF() before calling bdrv_open.
>   */

It's helpful to be explicit about ownership when the function fails:
"The reference to the QDict belongs to the block layer after the call
(even on failure)".



reply via email to

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