[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)".
- [Qemu-devel] [RFC PATCH 0/6] block: Add driver specific options, Kevin Wolf, 2013/02/27
- [Qemu-devel] [RFC PATCH 3/6] Add qdict_clone_shallow(), Kevin Wolf, 2013/02/27
- [Qemu-devel] [RFC PATCH 2/6] block: Add options QDict to bdrv_open() prototype, Kevin Wolf, 2013/02/27
- Re: [Qemu-devel] [RFC PATCH 2/6] block: Add options QDict to bdrv_open() prototype,
Stefan Hajnoczi <=
- [Qemu-devel] [RFC PATCH 1/6] block: Add options QDict to .bdrv_open(), Kevin Wolf, 2013/02/27
- [Qemu-devel] [RFC PATCH 5/6] block: Support driver specific options in drive_init(), Kevin Wolf, 2013/02/27
- [Qemu-devel] [RFC PATCH 6/6] qcow2: Allow lazy refcounts to be enabled on the command line, Kevin Wolf, 2013/02/27
- [Qemu-devel] [RFC PATCH 4/6] block: Add options QDict to bdrv_open_common(), Kevin Wolf, 2013/02/27
- Re: [Qemu-devel] [RFC PATCH 0/6] block: Add driver specific options, Eric Blake, 2013/02/27
- Re: [Qemu-devel] [RFC PATCH 0/6] block: Add driver specific options, Stefan Hajnoczi, 2013/02/28