21.03.2018 19:57, Eric Blake wrote:
On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Rather sparse on the details in the commit message; I had to read the
patch to even learn what the new namespace is.
oh, yes, sorry :(
@@ -92,6 +101,7 @@ typedef struct NBDExportMetaContexts {
bool valid; /* means that negotiation of the option finished
without
errors */
bool base_allocation; /* export base:allocation context (block
status) */
+ bool dirty_bitmap; /* export
qemu-dirty-bitmap:<export_bitmap_name> */
That's a LONG namespace name, and it does not lend itself well to
other qemu extensions; so future qemu BLOCK_STATUS additions would
require consuming yet another namespace and additional upstream NBD
registration. Wouldn't it be better to have the namespace be 'qemu:'
(which we register with upstream NBD just once), where we are then
free to document leafnames to look like 'dirty-bitmap:name' or
'foo:bar'?
No doubts. (and this shows, that we may want namespaces in namespaces,
so we'll parse ':' anyway).
Only one note here (I'm ashamed): 'qemu-dirty-bitmap' namespace is
used in Virtuozzo for the feature, yes, without 'x-' prefix. It's my
fault, and it should not influence final solution. The probability of
problems is near to zero (especially if we decide now to use 'qemu:'
namespace for all qemu-specific things. But I'm not sure about, should
we mention this fact in the spec.
[cc NBD list]