[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.9 1/5] rbd: Clean up runtime_opts
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH for-2.9 1/5] rbd: Clean up runtime_opts |
Date: |
Thu, 23 Mar 2017 21:49:41 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 23.03.2017 um 11:55 hat Markus Armbruster geschrieben:
> runtime_opts is used for three different purposes:
>
> * qemu_rbd_open() uses it to accept options it recognizes, such as
> "pool" and "image". Other .bdrv_open() methods do it similarly.
>
> * qemu_rbd_open() accepts additional list-valued options
> auth-supported and server, with the help of qemu_rbd_array_opts().
> The list elements are again dictionaries. qemu_rbd_array_opts()
> uses runtime_opts to accept their members. Thus, runtime_opts
> contains recognized sub-sub-options "auth", "host", "port" in
> addition to recognized options. No other block driver does that.
>
> * qemu_rbd_create() uses it to converts the QDict produced by
> qemu_rbd_parse_filename() to QemuOpts. No other block driver does
> that. The keys produced by qemu_rbd_parse_filename() are "pool",
> "image", "snapshot", "conf", "user" and "keyvalue-pairs".
> qemu_rbd_open() accepts these, so no additional ones here.
>
> This is a confusing mess. Dates back to commit 0f9d252. First step
> to clean it up is documenting runtime_opts.desc[]:
>
> * Reorder entries to match the QAPI schema, like we do in other block
> drivers.
>
> * Document why the schema's "server" and "auth-supported" aren't in
> .desc[].
>
> * Document why "keyvalue-pairs", "host", "port" and "auth" are in
> .desc[], but not the schema.
>
> * Delete "filename", because none of the three users actually uses it.
>
> Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
- Re: [Qemu-devel] [PATCH for-2.9 5/5] rbd: Reject options server.*.{numeric, to, ipv4, ipv6}, (continued)
Re: [Qemu-devel] [PATCH for-2.9 4/5] rbd: Peel off redundant RbdAuthMethod wrapper struct, Kevin Wolf, 2017/03/23
[Qemu-devel] [PATCH for-2.9 1/5] rbd: Clean up runtime_opts, Markus Armbruster, 2017/03/23
[Qemu-devel] [PATCH for-2.9 2/5] rbd: Clean up qemu_rbd_create()'s detour through QemuOpts, Markus Armbruster, 2017/03/23
[Qemu-devel] [PATCH for-2.9 3/5] rbd: Rewrite the code to extract list-valued options, Markus Armbruster, 2017/03/23
Re: [Qemu-devel] [PATCH for-2.9 3/5] rbd: Rewrite the code to extract list-valued options, Kevin Wolf, 2017/03/23