qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: michael.roth@amd.com, eblake@redhat.com, kwolf@redhat.com,
	hreitz@redhat.com, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, arei.gonglei@huawei.com,
	pizhenwei@bytedance.com, jsnow@redhat.com,
	vsementsov@yandex-team.ru, eduardo@habkost.net,
	marcel.apfelbaum@gmail.com, wangyanan55@huawei.com,
	quintela@redhat.com, jasowang@redhat.com,
	yuval.shaia.ml@gmail.com, stefanha@redhat.com, kraxel@redhat.com,
	kkostiuk@redhat.com, qemu-block@nongnu.org,
	marcandre.lureau@gmail.com, david@redhat.com
Subject: [PATCH v2 16/16] qapi storage-daemon/qapi: Fix documentation section structure
Date: Tue, 25 Apr 2023 08:42:23 +0200	[thread overview]
Message-ID: <20230425064223.820979-17-armbru@redhat.com> (raw)
In-Reply-To: <20230425064223.820979-1-armbru@redhat.com>

In the QEMU QMP Reference Manual, subsection "Block core (VM
unrelated)" is empty.  Its contents is at the end of subsection
"Background jobs" instead.  That's because qapi/job.json is included
first from qapi/block-core.json, which makes qapi/job.json's
documentation go between qapi/block-core.json's subsection heading and
contents.

In the QEMU Storage Daemon QMP Reference Manual, section "Block
Devices" contains nothing but an empty subsection "Block core (VM
unrelated)".  The latter's contents is at the end section "Socket data
types", along with subsection "Block device exports".  Subsection
"Background jobs" is at the end of section "Cryptography".  All this
is because storage-daemon/qapi/qapi-schema.json includes modules in a
confused order.

Fix both as follows.

Turn subsection "Background jobs" into a section.

Move it before section "Block devices" in the QEMU QMP Reference
Manual, by including qapi/jobs.json right before qapi/block.json.

Reorder include directives in storage-daemon/qapi/qapi-schema.json to
match the order in qapi/qapi-schema.json, so that the QEMU Storage
Daemon QMP Reference Manual's section structure the QEMU QMP Reference
Manual's.

In the QEMU QMP Reference Manual, qapi/cryptodev.json's documentation
is at the end of section "Virtio devices".  That's because it lacks a
section heading, and therefore gets squashed into whatever section
happens to precede it.

Add section heading so it's in section "Cryptography devices".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: zhenwei pi <pizhenwei@bytedance.com>
---
 qapi/cryptodev.json                  |  4 ++++
 qapi/job.json                        |  2 +-
 qapi/qapi-schema.json                |  2 +-
 storage-daemon/qapi/qapi-schema.json | 22 +++++++++++++++-------
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/qapi/cryptodev.json b/qapi/cryptodev.json
index f33f96a692..cf960ea81f 100644
--- a/qapi/cryptodev.json
+++ b/qapi/cryptodev.json
@@ -4,6 +4,10 @@
 # This work is licensed under the terms of the GNU GPL, version 2 or later.
 # See the COPYING file in the top-level directory.
 
+##
+# = Cryptography devices
+##
+
 ##
 # @QCryptodevBackendAlgType:
 #
diff --git a/qapi/job.json b/qapi/job.json
index bc4104757a..9e29a796c5 100644
--- a/qapi/job.json
+++ b/qapi/job.json
@@ -2,7 +2,7 @@
 # vim: filetype=python
 
 ##
-# == Background jobs
+# = Background jobs
 ##
 
 ##
diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
index e57d8ff801..bb7217da26 100644
--- a/qapi/qapi-schema.json
+++ b/qapi/qapi-schema.json
@@ -43,11 +43,11 @@
 { 'include': 'sockets.json' }
 { 'include': 'run-state.json' }
 { 'include': 'crypto.json' }
+{ 'include': 'job.json' }
 { 'include': 'block.json' }
 { 'include': 'block-export.json' }
 { 'include': 'char.json' }
 { 'include': 'dump.json' }
-{ 'include': 'job.json' }
 { 'include': 'net.json' }
 { 'include': 'rdma.json' }
 { 'include': 'rocker.json' }
diff --git a/storage-daemon/qapi/qapi-schema.json b/storage-daemon/qapi/qapi-schema.json
index 67749d1101..f10c949490 100644
--- a/storage-daemon/qapi/qapi-schema.json
+++ b/storage-daemon/qapi/qapi-schema.json
@@ -15,18 +15,26 @@
 
 { 'include': '../../qapi/pragma.json' }
 
+# Documentation generated with qapi-gen.py is in source order, with
+# included sub-schemas inserted at the first include directive
+# (subsequent include directives have no effect).  To get a sane and
+# stable order, it's best to include each sub-schema just once, or
+# include it first right here.
+
+{ 'include': '../../qapi/common.json' }
+{ 'include': '../../qapi/sockets.json' }
+{ 'include': '../../qapi/crypto.json' }
+{ 'include': '../../qapi/job.json' }
+
 ##
 # = Block devices
 ##
 { 'include': '../../qapi/block-core.json' }
 { 'include': '../../qapi/block-export.json' }
+
 { 'include': '../../qapi/char.json' }
-{ 'include': '../../qapi/common.json' }
-{ 'include': '../../qapi/control.json' }
-{ 'include': '../../qapi/crypto.json' }
-{ 'include': '../../qapi/introspect.json' }
-{ 'include': '../../qapi/job.json' }
 { 'include': '../../qapi/authz.json' }
-{ 'include': '../../qapi/qom.json' }
-{ 'include': '../../qapi/sockets.json' }
 { 'include': '../../qapi/transaction.json' }
+{ 'include': '../../qapi/control.json' }
+{ 'include': '../../qapi/introspect.json' }
+{ 'include': '../../qapi/qom.json' }
-- 
2.39.2



  parent reply	other threads:[~2023-04-25  6:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  6:42 [PATCH v2 00/16] qapi qga/qapi-schema: Doc fixes Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 01/16] qga/qapi-schema: Tidy up documentation of guest-fsfreeze-status Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 02/16] qga/qapi-schema: Fix a misspelled reference Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 03/16] qapi: Fix misspelled references Markus Armbruster
2023-04-25  7:17   ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 04/16] qapi: Fix up references to long gone error classes Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 05/16] qapi/block-core: Clean up after removal of dirty bitmap @status Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 06/16] qapi: @foo should be used to reference, not ``foo`` Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 07/16] qapi: Tidy up examples Markus Armbruster
2023-04-25  7:20   ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 08/16] qapi: Delete largely misleading "Stability Considerations" Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 09/16] qapi: Fix bullet list markup in documentation Markus Armbruster
2023-04-27 15:28   ` Markus Armbruster
2023-04-27 15:44     ` Juan Quintela
2023-04-25  6:42 ` [PATCH v2 10/16] qapi: Fix unintended definition lists " Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 11/16] qga/qapi-schema: Fix member documentation markup Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 12/16] qapi: Fix argument " Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 13/16] qapi: Replace ad hoc "since" documentation by member documentation Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 14/16] qapi: Fix misspelled section tags in doc comments Markus Armbruster
2023-04-25  6:42 ` [PATCH v2 15/16] qapi: Format since information the conventional way: (since X.Y) Markus Armbruster
2023-04-25  6:42 ` Markus Armbruster [this message]
2023-04-27  9:53 ` [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls Markus Armbruster
2023-04-27 11:09   ` Juan Quintela
2023-04-27 12:36     ` Markus Armbruster
2023-04-27 12:41   ` Vladimir Sementsov-Ogievskiy
2023-04-27 13:47     ` Vladimir Sementsov-Ogievskiy
2023-04-28  9:34     ` Markus Armbruster
2023-04-28  9:44       ` Vladimir Sementsov-Ogievskiy
2023-04-28 10:27         ` Markus Armbruster
2023-04-27  9:53 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425064223.820979-17-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=david@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=pizhenwei@bytedance.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=wangyanan55@huawei.com \
    --cc=yuval.shaia.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).