[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 1/5] block/rbd: don't copy strings in qemu_rb
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v2 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok() |
Date: |
Mon, 27 Feb 2017 15:26:24 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 02/27/2017 12:58 PM, Jeff Cody wrote:
> This patch is prep work for parsing options for .bdrv_parse_filename,
> and using QDict options.
>
> The function qemu_rbd_next_tok() searched for various key/value pairs,
> and copied them into buffers. This will soon be an unnecessary extra
> step, so we will now return found strings by reference only, and
> offload the responsibility for safely handling/coping these strings to
> the caller.
>
> This also cleans up error handling some, as the callers now rely on
> the Error object to determine if there is a parse error.
>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
> block/rbd.c | 99
> +++++++++++++++++++++++++++++++++++++++----------------------
> 1 file changed, 64 insertions(+), 35 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v2 0/5] RBD: blockdev-add, Jeff Cody, 2017/02/27
- [Qemu-block] [PATCH v2 2/5] block/rbd: add all the currently supported runtime_opts, Jeff Cody, 2017/02/27
- [Qemu-block] [PATCH v2 1/5] block/rbd: don't copy strings in qemu_rbd_next_tok(), Jeff Cody, 2017/02/27
- [Qemu-block] [PATCH v2 4/5] block/rbd: add blockdev-add support, Jeff Cody, 2017/02/27
- [Qemu-block] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Jeff Cody, 2017/02/27
- Re: [Qemu-block] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Daniel P. Berrange, 2017/02/27
- Re: [Qemu-block] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Eric Blake, 2017/02/27
- Re: [Qemu-block] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Jeff Cody, 2017/02/27
- Re: [Qemu-block] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Jeff Cody, 2017/02/27
- Re: [Qemu-block] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Daniel P. Berrange, 2017/02/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Daniel P. Berrange, 2017/02/28
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 5/5] block/rbd: add support for 'mon_host', 'auth_supported' via QAPI, Jeff Cody, 2017/02/28