[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/7] block: Parse 'detect-zeroes' in bdrv_open_c
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 4/7] block: Parse 'detect-zeroes' in bdrv_open_common() |
Date: |
Wed, 21 Sep 2016 14:16:02 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 09/20/2016 04:08 PM, Kevin Wolf wrote:
> Amonst others, this means that you can now use the 'detect-zeroes'
s/Amonst/Amongst/ (that's UK spelling; US shortens it to Among)
> option for non-top-level nodes in blockdev-add, like the QAPI schema
> promises.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block.c | 33 +++++++++++++++++++++++++++++++++
> blockdev.c | 9 +--------
> 2 files changed, 34 insertions(+), 8 deletions(-)
>
> @@ -990,6 +997,32 @@ static int bdrv_open_common(BlockDriverState *bs,
> BdrvChild *file,
> }
> }
>
> + detect_zeroes = qemu_opt_get(opts, "detect-zeroes");
> + if (detect_zeroes) {
> + BlockdevDetectZeroesOptions value =
> + qapi_enum_parse(BlockdevDetectZeroesOptions_lookup,
> + qemu_opt_get(opts, "detect-zeroes"),
Why do we have to repeat the qemu_opt_get() here, instead of just
passing in the just-collected detect_zeroes local variable?
Otherwise looks fine.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/7] block: Make more blockdev-add options work, Kevin Wolf, 2016/09/20
- [Qemu-devel] [PATCH 1/7] block: Drop aio/cache consistency check from qmp_blockdev_add(), Kevin Wolf, 2016/09/20
- [Qemu-devel] [PATCH 5/7] block: Use 'detect-zeroes' option for 'blockdev-change-medium', Kevin Wolf, 2016/09/20
- [Qemu-devel] [PATCH 4/7] block: Parse 'detect-zeroes' in bdrv_open_common(), Kevin Wolf, 2016/09/20
- Re: [Qemu-devel] [PATCH 4/7] block: Parse 'detect-zeroes' in bdrv_open_common(),
Eric Blake <=
- [Qemu-devel] [PATCH 7/7] block: Remove qemu_root_bds_opts, Kevin Wolf, 2016/09/20
- [Qemu-devel] [PATCH 2/7] block/qapi: Use separate options type for curl driver, Kevin Wolf, 2016/09/20
- [Qemu-devel] [PATCH 3/7] block/qapi: Move 'aio' option to file driver, Kevin Wolf, 2016/09/20
- [Qemu-devel] [PATCH 6/7] block: Move 'discard' option to bdrv_open_common(), Kevin Wolf, 2016/09/20