[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 15/19] nbd/client: Add nbd_receive_export_lis
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 15/19] nbd/client: Add nbd_receive_export_list() |
Date: |
Wed, 16 Jan 2019 14:01:06 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/16/19 4:15 AM, Vladimir Sementsov-Ogievskiy wrote:
>> This patch adds the low-level client code for grabbing the list
>> of exports. It benefits from the recent refactoring patches, as
>> well as a minor tweak of changing nbd_opt_go() to nbd_opt_info_or_go(),
>> -/* Returns -1 if NBD_OPT_GO proves the export @info->name cannot be
>> +/*
>> + * Returns -1 if NBD_OPT_GO proves the export @info->name cannot be
>> * used, 0 if NBD_OPT_GO is unsupported (fall back to NBD_OPT_LIST and
>> * NBD_OPT_EXPORT_NAME in that case), and > 0 if the export is good to
>> - * go (with the rest of @info populated). */
>> -static int nbd_opt_go(QIOChannel *ioc, NBDExportInfo *info, Error **errp)
>> + * go (with the rest of @info populated).
>> + */
>
> Don't you want to upgrade a comment a little bit, to reflect support for
> OPT_INFO?
Yeah, but then the tweaks start to build up. I'll split the function
rename to a separate patch,
>>
>> - trace_nbd_opt_go_start(info->name);
>> + assert(opt == NBD_OPT_GO || opt == NBD_OPT_INFO);
>> + trace_nbd_opt_go_start(nbd_opt_lookup(opt), info->name);
>
> I'd prefer to upgrade trace-point name too, as well as other several
> trace_nbd_opt_go_* trace
> points in the function.
and improve the traces there too.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v3 13/19] nbd/client: Split handshake into two functions, Eric Blake, 2019/01/12
[Qemu-devel] [PATCH v3 09/19] nbd/client: Change signature of nbd_negotiate_simple_meta_context(), Eric Blake, 2019/01/12
[Qemu-devel] [PATCH v3 15/19] nbd/client: Add nbd_receive_export_list(), Eric Blake, 2019/01/12
[Qemu-devel] [PATCH v3 02/19] qemu-nbd: Enhance man page, Eric Blake, 2019/01/12
[Qemu-devel] [PATCH v3 06/19] qemu-nbd: Avoid strtol open-coding, Eric Blake, 2019/01/12
[Qemu-devel] [PATCH v3 18/19] nbd/client: Work around 3.0 bug for listing meta contexts, Eric Blake, 2019/01/12