All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
	"Eric Blake" <eblake@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Lukas Straub" <lukasstraub2@web.de>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Jason Wang" <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	qemu-block@nongnu.org, "Peter Xu" <peterx@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>
Subject: Re: [PATCH 03/18] qapi: add cross-references to block layer
Date: Wed, 02 Jul 2025 09:45:23 +0200	[thread overview]
Message-ID: <87frffqbn0.fsf@pond.sub.org> (raw)
In-Reply-To: <20250613203620.1283814-4-jsnow@redhat.com> (John Snow's message of "Fri, 13 Jun 2025 16:36:05 -0400")

John Snow <jsnow@redhat.com> writes:

> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qapi/block-core.json   | 186 ++++++++++++++++++++---------------------
>  qapi/block-export.json |  36 ++++----
>  qapi/block.json        |  14 ++--
>  qapi/transaction.json  |  20 ++---
>  4 files changed, 128 insertions(+), 128 deletions(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index f18db3149a3..74e6a81a5e9 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json

[...]

> @@ -3089,7 +3089,7 @@
>  # necessary cleanup.  This command requires that all involved jobs are
>  # in the PENDING state.
>  #
> -# For jobs in a transaction, instructing one job to finalize will
> +# For jobs in a :qapi:cmd:`transaction`, instructing one job to finalize will

Why and when do we need :qapi:cmd:?

>  # force ALL jobs in the transaction to finalize, so it is only
>  # necessary to instruct a single member job to finalize.
>  #

[...]

> @@ -5855,8 +5855,8 @@
>  # @BLOCK_JOB_PENDING:
>  #
>  # Emitted when a block job is awaiting explicit authorization to
> -# finalize graph changes via @job-finalize.  If this job is part
> -# of a transaction, it will not emit this event until the transaction
> +# finalize graph changes via `job-finalize`.  If this job is part
> +# of a :qapi:cmd:`transaction`, it will not emit this event until the transaction
>  # has converged first.
>  #
>  # @type: job type

[...]

> diff --git a/qapi/transaction.json b/qapi/transaction.json
> index 9d9e7af26cb..c02e402790e 100644
> --- a/qapi/transaction.json
> +++ b/qapi/transaction.json
> @@ -11,7 +11,7 @@
>  ##
>  # @Abort:
>  #
> -# This action can be used to test transaction failure.
> +# This action can be used to test `transaction` failure.

I have doubts about this one.

The comment isn't great to begin with.  It's from commit 78b18b78aa8
(blockdev: add Abort transaction):

    blockdev: add Abort transaction
    
    The Abort action can be used to test QMP 'transaction' failure.  Add it
    as the last action to exercise the .abort() and .cleanup() code paths
    for all previous actions.

So, Abort for testing transactionable commands' handling of transaction
failure, not for testing failure of the transaction command.  But the
link points to the command, and thus suggests it's about command failure.

Ideally, we'd point to some "introduction to transactions" text.  We
don't have one.

The other occurences of `transaction` are similarly problematic, except
for one noted below.  Let's leave the problematic ones alone in this
patch, to keep it mechanical and uncontroversial.

Not this patch's problem: the transaction command's doc comment is
*crap*.  Most of it discusses about snapshots, as if snapshots where the
only transactionable commands.  It talks about "the dictionary", and the
reader can only guess what that might mean.

>  #
>  # Since: 1.6
>  ##
> @@ -67,8 +67,8 @@
>  #
>  # Features:
>  #
> -# @deprecated: Member @drive-backup is deprecated.  Use member
> -#     @blockdev-backup instead.
> +# @deprecated: Member `drive-backup` is deprecated.  Use member
> +#     `blockdev-backup` instead.
>  #
>  # Since: 1.1
>  ##
> @@ -156,7 +156,7 @@
>  # @TransactionAction:
>  #
>  # A discriminated record of operations that can be performed with
> -# @transaction.
> +# `transaction`.

This link is a keeper.

>  #
>  # @type: the operation to be performed
>  #
> @@ -187,7 +187,7 @@
>  #
>  # @completion-mode: Controls how jobs launched asynchronously by
>  #     Actions will complete or fail as a group.  See
> -#     @ActionCompletionMode for details.
> +#     `ActionCompletionMode` for details.
>  #
>  # Since: 2.5
>  ##
> @@ -224,20 +224,20 @@
>  # support it, for example, qcow2, and rbd,
>  #
>  # On failure, QEMU will try delete the newly created internal snapshot
> -# in the transaction.  When an I/O error occurs during deletion, the
> +# in the `transaction`.  When an I/O error occurs during deletion, the
>  # user needs to fix it later with qemu-img or other command.
>  #
> -# @actions: List of @TransactionAction; information needed for the
> +# @actions: List of `TransactionAction`; information needed for the
>  #     respective operations.
>  #
>  # @properties: structure of additional options to control the
> -#     execution of the transaction.  See @TransactionProperties for
> +#     execution of the `transaction`.  See `TransactionProperties` for
>  #     additional detail.
>  #
>  # Errors:
> -#     - Any errors from commands in the transaction
> +#     - Any errors from commands in the `transaction`
>  #
> -# .. note:: The transaction aborts on the first failure.  Therefore,
> +# .. note:: The `transaction` aborts on the first failure.  Therefore,
>  #    there will be information on only one failed operation returned
>  #    in an error condition, and subsequent actions will not have been
>  #    attempted.



  parent reply	other threads:[~2025-07-02  7:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13 20:36 [PATCH 00/18] QAPI: add cross-references to qapi docs John Snow
2025-06-13 20:36 ` [PATCH 01/18] qapi: add cross-references to acpi.json John Snow
2025-06-13 20:36 ` [PATCH 02/18] qapi: add cross-references to authz.json John Snow
2025-06-13 20:36 ` [PATCH 03/18] qapi: add cross-references to block layer John Snow
2025-06-16 16:30   ` Eric Blake
2025-06-16 16:45     ` John Snow
2025-07-02  7:45   ` Markus Armbruster [this message]
2025-06-13 20:36 ` [PATCH 04/18] qapi: add cross-references to crypto.json John Snow
2025-06-13 20:36 ` [PATCH 05/18] qapi: add cross-references to dump.json John Snow
2025-06-13 20:36 ` [PATCH 06/18] qapi: add cross-references to job.json John Snow
2025-07-02  7:57   ` Markus Armbruster
2025-06-13 20:36 ` [PATCH 07/18] qapi: add cross-references to Machine core John Snow
2025-07-02  8:00   ` Markus Armbruster
2025-06-13 20:36 ` [PATCH 08/18] qapi: add cross-references to migration.json John Snow
2025-07-02  8:04   ` Markus Armbruster
2025-07-11  5:32     ` John Snow
2025-06-13 20:36 ` [PATCH 09/18] qapi: add cross-references to net.json John Snow
2025-06-13 20:36 ` [PATCH 10/18] qapi: add cross-references to pci.json John Snow
2025-06-13 20:36 ` [PATCH 11/18] qapi: add cross-references to QOM John Snow
2025-06-13 20:36 ` [PATCH 12/18] qapi: add cross-references to replay.json John Snow
2025-06-13 20:36 ` [PATCH 13/18] qapi: add cross-references to run-state.json John Snow
2025-06-13 20:36 ` [PATCH 14/18] qapi: add cross-references to sockets.json John Snow
2025-06-16 17:04   ` Eric Blake
2025-06-13 20:36 ` [PATCH 15/18] qapi: add cross-references to ui.json John Snow
2025-07-02  8:10   ` Markus Armbruster
2025-06-13 20:36 ` [PATCH 16/18] qapi: add cross-references to virtio.json John Snow
2025-06-13 20:36 ` [PATCH 17/18] qapi: add cross-references to yank.json John Snow
2025-06-16 15:24   ` Lukas Straub
2025-07-02  8:14   ` Markus Armbruster
2025-06-13 20:36 ` [PATCH 18/18] qapi: add cross-references to misc modules John Snow
2025-06-16 17:06   ` Eric Blake

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=87frffqbn0.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=anisinha@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lukasstraub2@web.de \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.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 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.