[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2] block: introduce BlockDriver.bdrv_needs_file
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V2] block: introduce BlockDriver.bdrv_needs_filename to enable some drivers. |
Date: |
Mon, 23 Sep 2013 09:59:27 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/23/2013 05:52 AM, Benoît Canet wrote:
> Some drivers will have driver specifics options but no filename.
> This new bool allow the block layer to treat them correctly.
>
> The .bdrv_needs_filename is set in drivers not having .bdrv_parse_filename and
> not having .bdrv_open.
>
> The first exception to this rule will be the quorum driver.
>
> Signed-off-by: Benoit Canet <address@hidden>
> ---
> +++ b/include/block/block_int.h
> @@ -73,6 +73,7 @@ struct BlockDriver {
> /* Any driver implementing this callback is expected to be able to handle
> * NULL file names in its .bdrv_open() implementation */
> void (*bdrv_parse_filename)(const char *filename, QDict *options, Error
> **errp);
> + bool bdrv_needs_filename;
Please use inline comments documenting this field's use.
>
> /* For handling image reopen for split or non-split files */
> int (*bdrv_reopen_prepare)(BDRVReopenState *reopen_state,
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature