Skip to contentSkip to conversation

docs: qsd: Explain --export nbd,name=... default

PATCH In review Kevin Wolf 3 participants 3 messages Mar 5, 2021

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 docs: qsd: Explain --export nbd,name=... default

The 'name' option for NBD exports is optional. Add a note that the default for the option is the node name (people could otherwise expect that it's the empty string like for qemu-nbd).

---
 docs/tools/qemu-storage-daemon.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
docs/tools/qemu-storage-daemon.rst +3 -2
index fe3042d609..086493ebb3 100644
@@ -80,8 +80,9 @@ Standard options:
   requests for modifying data (the default is off).
 
   The ``nbd`` export type requires ``--nbd-server`` (see below). ``name`` is
-  the NBD export name. ``bitmap`` is the name of a dirty bitmap reachable from
-  the block node, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the
+  the NBD export name (if not specified, it defaults to the given
+  ``node-name``). ``bitmap`` is the name of a dirty bitmap reachable from the
+  block node, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the
   metadata context name "qemu:dirty-bitmap:BITMAP" to inspect the bitmap.
 
   The ``vhost-user-blk`` export type takes a vhost-user socket address on which
Signature · 1 line
2.29.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Kevin Wolf

The 'name' option for NBD exports is optional. Add a note that the default for the option is the node name (people could otherwise expect that it's the empty string like for qemu-nbd).

---
  docs/tools/qemu-storage-daemon.rst | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Kevin Wolf
Quoted 8 lines · Kevin Wolf

The 'name' option for NBD exports is optional. Add a note that the default for the option is the node name (people could otherwise expect that it's the empty string like for qemu-nbd).

---
 docs/tools/qemu-storage-daemon.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Hmm. If we are only exporting a single image, letting "" serve as the default export name as a synonym for the non-empty node-name might be nice. But we can export more than one image at a time, at which point "" has no sane default, so always requiring the client to know the node name is tolerable. And 'qemu-nbd --list' or 'nbdinfo --list' are capable of showing which node name(s) an NBD server is exposing.

Quoted 18 lines
docs/tools/qemu-storage-daemon.rst +3 -2
index fe3042d609..086493ebb3 100644
@@ -80,8 +80,9 @@ Standard options:
   requests for modifying data (the default is off).
 
   The ``nbd`` export type requires ``--nbd-server`` (see below). ``name`` is
-  the NBD export name. ``bitmap`` is the name of a dirty bitmap reachable from
-  the block node, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the
+  the NBD export name (if not specified, it defaults to the given
+  ``node-name``). ``bitmap`` is the name of a dirty bitmap reachable from the
+  block node, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the
   metadata context name "qemu:dirty-bitmap:BITMAP" to inspect the bitmap.
 
   The ``vhost-user-blk`` export type takes a vhost-user socket address on which
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org