[Qemu-devel] [PATCH] qapi/block: Document restrictions for node names

Kevin Wolf posted 1 patch 7 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180806123728.13658-1-kwolf@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
qapi/block-core.json | 3 +++
1 file changed, 3 insertions(+)
[Qemu-devel] [PATCH] qapi/block: Document restrictions for node names
Posted by Kevin Wolf 7 years, 3 months ago
blockdev-add fails if an invalid node name is given, so we should
document what a valid node name even is.

Reported-by: Cong Li <coli@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 qapi/block-core.json | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 62a92fa4f4..fe565ebfaf 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -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


Re: [Qemu-devel] [PATCH] qapi/block: Document restrictions for node names
Posted by Cong Li 7 years, 2 months ago
----- Original Message -----
> From: "Kevin Wolf" <kwolf@redhat.com>
> To: qemu-block@nongnu.org
> Cc: kwolf@redhat.com, coli@redhat.com, qemu-devel@nongnu.org
> 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.
> 
> Reported-by: Cong Li <coli@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Reviewed-by: Cong Li <coli@redhat.com>

> ---
>  qapi/block-core.json | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 62a92fa4f4..fe565ebfaf 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -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
> 
> 

Re: [Qemu-devel] [Qemu-block] [PATCH] qapi/block: Document restrictions for node names
Posted by Alberto Garcia 7 years, 2 months ago
On Mon 06 Aug 2018 02:37:28 PM CEST, Kevin Wolf wrote:
> blockdev-add fails if an invalid node name is given, so we should
> document what a valid node name even is.
>
> Reported-by: Cong Li <coli@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Reviewed-by: Alberto Garcia <berto@igalia.com>

Berto

Re: [Qemu-devel] [PATCH] qapi/block: Document restrictions for node names
Posted by Eric Blake 7 years, 3 months ago
On 08/06/2018 07:37 AM, Kevin Wolf wrote:
> blockdev-add fails if an invalid node name is given, so we should
> document what a valid node name even is.
> 
> Reported-by: Cong Li <coli@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>   qapi/block-core.json | 3 +++
>   1 file changed, 3 insertions(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 62a92fa4f4..fe565ebfaf 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -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).
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org