Skip to contentSkip to conversation

qapi/block: Document restrictions for node names

PATCH In review Kevin Wolf 4 participants 4 messages Aug 6, 2018 – Aug 7, 2018

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 qapi/block: Document restrictions for node names

blockdev-add fails if an invalid node name is given, so we should document what a valid node name even is.

---
 qapi/block-core.json | 3 +++
 1 file changed, 3 insertions(+)
qapi/block-core.json +3 -0
index 62a92fa4f4..fe565ebfaf 100644
@@ -3563,6 +3563,9 @@
 # @driver:        block driver name
 # @node-name:     the node name of the new node (Since 2.0).
 #                 This option is required on the top level of blockdev-add.
+#                 Valid node names start with an alphabetic character and may
+#                 contain only alphanumeric characters, '-', '.' and '_'. Their
+#                 maximum length is 31 characters.
 # @discard:       discard-related options (default: ignore)
 # @cache:         cache-related options
 # @read-only:     whether the block device should be read-only (default: false).
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Kevin Wolf

blockdev-add fails if an invalid node name is given, so we should document what a valid node name even is.

---
  qapi/block-core.json | 3 +++
  1 file changed, 3 insertions(+)
Quoted 16 lines
qapi/block-core.json +3 -0
index 62a92fa4f4..fe565ebfaf 100644
@@ -3563,6 +3563,9 @@
  # @driver:        block driver name
  # @node-name:     the node name of the new node (Since 2.0).
  #                 This option is required on the top level of blockdev-add.
+#                 Valid node names start with an alphabetic character and may
+#                 contain only alphanumeric characters, '-', '.' and '_'. Their
+#                 maximum length is 31 characters.
  # @discard:       discard-related options (default: ignore)
  # @cache:         cache-related options
  # @read-only:     whether the block device should be read-only (default: false).
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Reviewed-by on v1 1/1
#2 lore raw
In reply to Kevin Wolf

----- Original Message -----

Quoted 11 lines

From: "Kevin Wolf" <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Sent: Monday, August 6, 2018 8:37:28 PM
Subject: [PATCH] qapi/block: Document restrictions for node names

blockdev-add fails if an invalid node name is given, so we should document what a valid node name even is.

Quoted 25 lines
---
 qapi/block-core.json | 3 +++
 1 file changed, 3 insertions(+)
qapi/block-core.json +1 -0
index 62a92fa4f4..fe565ebfaf 100644
@@ -3563,6 +3563,9 @@
 # @driver:        block driver name
 # @node-name:     the node name of the new node (Since 2.0).
 #                 This option is required on the top level of blockdev-add.
+#                 Valid node names start with an alphabetic character and

may
+# contain only alphanumeric characters, '-', '.' and '_'.
Their

+#                 maximum length is 31 characters.
 # @discard:       discard-related options (default: ignore)
 # @cache:         cache-related options
 # @read-only:     whether the block device should be read-only (default:

false).
--
2.13.6