All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] move BlockdevRef definition before using it
@ 2013-10-30  6:52 ` Amos Kong
  0 siblings, 0 replies; 6+ messages in thread
From: Amos Kong @ 2013-10-30  6:52 UTC (permalink / raw)
  To: kwolf, qemu-trivial; +Cc: mjt, qemu-devel

From: Amos Kong <kongjianjun@gmail.com>

@BlockdevRef is used in @BlockdevOptionsGenericFormat and
@BlockdevOptionsGenericCOWFormat.

Signed-off-by: Amos Kong <kongjianjun@gmail.com>
---
 qapi-schema.json | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index 60f3fd1..8af8187 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4061,6 +4061,23 @@
             '*rw': 'bool' } }
 
 ##
+# @BlockdevRef
+#
+# Reference to a block device.
+#
+# @definition:      defines a new block device inline
+# @reference:       references the ID of an existing block device. An
+#                   empty string means that no block device should be
+#                   referenced.
+#
+# Since: 1.7
+##
+{ 'union': 'BlockdevRef',
+  'discriminator': {},
+  'data': { 'definition': 'BlockdevOptions',
+            'reference': 'str' } }
+
+##
 # @BlockdevOptionsGenericFormat
 #
 # Driver specific block device options for image format that have no option
@@ -4162,23 +4179,6 @@
   } }
 
 ##
-# @BlockdevRef
-#
-# Reference to a block device.
-#
-# @definition:      defines a new block device inline
-# @reference:       references the ID of an existing block device. An
-#                   empty string means that no block device should be
-#                   referenced.
-#
-# Since: 1.7
-##
-{ 'union': 'BlockdevRef',
-  'discriminator': {},
-  'data': { 'definition': 'BlockdevOptions',
-            'reference': 'str' } }
-
-##
 # @blockdev-add:
 #
 # Creates a new block device.
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH] move BlockdevRef definition before using it
@ 2013-10-30  6:52 ` Amos Kong
  0 siblings, 0 replies; 6+ messages in thread
From: Amos Kong @ 2013-10-30  6:52 UTC (permalink / raw)
  To: kwolf, qemu-trivial; +Cc: mjt, qemu-devel

From: Amos Kong <kongjianjun@gmail.com>

@BlockdevRef is used in @BlockdevOptionsGenericFormat and
@BlockdevOptionsGenericCOWFormat.

Signed-off-by: Amos Kong <kongjianjun@gmail.com>
---
 qapi-schema.json | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index 60f3fd1..8af8187 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4061,6 +4061,23 @@
             '*rw': 'bool' } }
 
 ##
+# @BlockdevRef
+#
+# Reference to a block device.
+#
+# @definition:      defines a new block device inline
+# @reference:       references the ID of an existing block device. An
+#                   empty string means that no block device should be
+#                   referenced.
+#
+# Since: 1.7
+##
+{ 'union': 'BlockdevRef',
+  'discriminator': {},
+  'data': { 'definition': 'BlockdevOptions',
+            'reference': 'str' } }
+
+##
 # @BlockdevOptionsGenericFormat
 #
 # Driver specific block device options for image format that have no option
@@ -4162,23 +4179,6 @@
   } }
 
 ##
-# @BlockdevRef
-#
-# Reference to a block device.
-#
-# @definition:      defines a new block device inline
-# @reference:       references the ID of an existing block device. An
-#                   empty string means that no block device should be
-#                   referenced.
-#
-# Since: 1.7
-##
-{ 'union': 'BlockdevRef',
-  'discriminator': {},
-  'data': { 'definition': 'BlockdevOptions',
-            'reference': 'str' } }
-
-##
 # @blockdev-add:
 #
 # Creates a new block device.
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] move BlockdevRef definition before using it
  2013-10-30  6:52 ` [Qemu-devel] " Amos Kong
@ 2013-10-30  7:04   ` Amos Kong
  -1 siblings, 0 replies; 6+ messages in thread
From: Amos Kong @ 2013-10-30  7:04 UTC (permalink / raw)
  To: Amos Kong; +Cc: Kevin Wolf, qemu-trivial, mjt, qemu-devel

On Wed, Oct 30, 2013 at 2:52 PM, Amos Kong <akong@redhat.com> wrote:
>
> From: Amos Kong <kongjianjun@gmail.com>
>
> @BlockdevRef is used in @BlockdevOptionsGenericFormat and
> @BlockdevOptionsGenericCOWFormat.

NACK this patch.

@BlockdevOptions is used in @BlockdevRef, this change is meaningless.

> Signed-off-by: Amos Kong <kongjianjun@gmail.com>
> ---
>  qapi-schema.json | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 60f3fd1..8af8187 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -4061,6 +4061,23 @@
>              '*rw': 'bool' } }
>
>  ##
> +# @BlockdevRef
> +#
> +# Reference to a block device.
> +#
> +# @definition:      defines a new block device inline
> +# @reference:       references the ID of an existing block device. An
> +#                   empty string means that no block device should be
> +#                   referenced.
> +#
> +# Since: 1.7
> +##
> +{ 'union': 'BlockdevRef',
> +  'discriminator': {},
> +  'data': { 'definition': 'BlockdevOptions',
> +            'reference': 'str' } }
> +
> +##
>  # @BlockdevOptionsGenericFormat
>  #
>  # Driver specific block device options for image format that have no option
> @@ -4162,23 +4179,6 @@
>    } }
>
>  ##
> -# @BlockdevRef
> -#
> -# Reference to a block device.
> -#
> -# @definition:      defines a new block device inline
> -# @reference:       references the ID of an existing block device. An
> -#                   empty string means that no block device should be
> -#                   referenced.
> -#
> -# Since: 1.7
> -##
> -{ 'union': 'BlockdevRef',
> -  'discriminator': {},
> -  'data': { 'definition': 'BlockdevOptions',
> -            'reference': 'str' } }
> -
> -##
>  # @blockdev-add:
>  #
>  # Creates a new block device.
> --
> 1.8.3.1
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] move BlockdevRef definition before using it
@ 2013-10-30  7:04   ` Amos Kong
  0 siblings, 0 replies; 6+ messages in thread
From: Amos Kong @ 2013-10-30  7:04 UTC (permalink / raw)
  To: Amos Kong; +Cc: Kevin Wolf, qemu-trivial, mjt, qemu-devel

On Wed, Oct 30, 2013 at 2:52 PM, Amos Kong <akong@redhat.com> wrote:
>
> From: Amos Kong <kongjianjun@gmail.com>
>
> @BlockdevRef is used in @BlockdevOptionsGenericFormat and
> @BlockdevOptionsGenericCOWFormat.

NACK this patch.

@BlockdevOptions is used in @BlockdevRef, this change is meaningless.

> Signed-off-by: Amos Kong <kongjianjun@gmail.com>
> ---
>  qapi-schema.json | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 60f3fd1..8af8187 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -4061,6 +4061,23 @@
>              '*rw': 'bool' } }
>
>  ##
> +# @BlockdevRef
> +#
> +# Reference to a block device.
> +#
> +# @definition:      defines a new block device inline
> +# @reference:       references the ID of an existing block device. An
> +#                   empty string means that no block device should be
> +#                   referenced.
> +#
> +# Since: 1.7
> +##
> +{ 'union': 'BlockdevRef',
> +  'discriminator': {},
> +  'data': { 'definition': 'BlockdevOptions',
> +            'reference': 'str' } }
> +
> +##
>  # @BlockdevOptionsGenericFormat
>  #
>  # Driver specific block device options for image format that have no option
> @@ -4162,23 +4179,6 @@
>    } }
>
>  ##
> -# @BlockdevRef
> -#
> -# Reference to a block device.
> -#
> -# @definition:      defines a new block device inline
> -# @reference:       references the ID of an existing block device. An
> -#                   empty string means that no block device should be
> -#                   referenced.
> -#
> -# Since: 1.7
> -##
> -{ 'union': 'BlockdevRef',
> -  'discriminator': {},
> -  'data': { 'definition': 'BlockdevOptions',
> -            'reference': 'str' } }
> -
> -##
>  # @blockdev-add:
>  #
>  # Creates a new block device.
> --
> 1.8.3.1
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] move BlockdevRef definition before using it
  2013-10-30  7:04   ` Amos Kong
@ 2013-10-30 12:32     ` Eric Blake
  -1 siblings, 0 replies; 6+ messages in thread
From: Eric Blake @ 2013-10-30 12:32 UTC (permalink / raw)
  To: Amos Kong, Amos Kong; +Cc: Kevin Wolf, qemu-trivial, mjt, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

On 10/30/2013 01:04 AM, Amos Kong wrote:
> On Wed, Oct 30, 2013 at 2:52 PM, Amos Kong <akong@redhat.com> wrote:
>>
>> From: Amos Kong <kongjianjun@gmail.com>
>>
>> @BlockdevRef is used in @BlockdevOptionsGenericFormat and
>> @BlockdevOptionsGenericCOWFormat.
> 
> NACK this patch.
> 
> @BlockdevOptions is used in @BlockdevRef, this change is meaningless.

Furthermore, qapi allows circular recursive types, so we can't do full
topological sorting (the generator handles a reference to a type before
its declaration just fine, as long as all names encountered in the file
can be resolved at the time the complete file has been parsed).

If anything, I think that alphabetical ordering _might_ make it easier
to find types, instead of the current ad hoc ordering.  Also, at one
point there was a patch proposed to allow file inclusion, where you
could break out related types/commands into a secondary file rather than
cramming everything into qapi-schema.json, but I don't know if that's
worth reviving.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] move BlockdevRef definition before using it
@ 2013-10-30 12:32     ` Eric Blake
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Blake @ 2013-10-30 12:32 UTC (permalink / raw)
  To: Amos Kong, Amos Kong; +Cc: Kevin Wolf, qemu-trivial, mjt, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

On 10/30/2013 01:04 AM, Amos Kong wrote:
> On Wed, Oct 30, 2013 at 2:52 PM, Amos Kong <akong@redhat.com> wrote:
>>
>> From: Amos Kong <kongjianjun@gmail.com>
>>
>> @BlockdevRef is used in @BlockdevOptionsGenericFormat and
>> @BlockdevOptionsGenericCOWFormat.
> 
> NACK this patch.
> 
> @BlockdevOptions is used in @BlockdevRef, this change is meaningless.

Furthermore, qapi allows circular recursive types, so we can't do full
topological sorting (the generator handles a reference to a type before
its declaration just fine, as long as all names encountered in the file
can be resolved at the time the complete file has been parsed).

If anything, I think that alphabetical ordering _might_ make it easier
to find types, instead of the current ad hoc ordering.  Also, at one
point there was a patch proposed to allow file inclusion, where you
could break out related types/commands into a secondary file rather than
cramming everything into qapi-schema.json, but I don't know if that's
worth reviving.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-30 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  6:52 [Qemu-trivial] [PATCH] move BlockdevRef definition before using it Amos Kong
2013-10-30  6:52 ` [Qemu-devel] " Amos Kong
2013-10-30  7:04 ` [Qemu-trivial] " Amos Kong
2013-10-30  7:04   ` Amos Kong
2013-10-30 12:32   ` [Qemu-trivial] " Eric Blake
2013-10-30 12:32     ` Eric Blake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.