From: Markus Armbruster <armbru@pond.sub.org>
To: Eric Blake <eblake@redhat.com>
Cc: Guillaume Vincke <guillaume.vincke@ovhcloud.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v4 1/2] nbd: Add an unstable query for the client state
Date: Fri, 04 Dec 2026 10:40:16 +0100 [thread overview]
Message-ID: <87bj718jun.fsf@pond.sub.org> (raw)
In-Reply-To: <axG0_mTXRxdrQdtc@redhat.com> (Eric Blake's message of "Thu, 3 Dec 2026 12:41:10 -0600")
Eric Blake <eblake@redhat.com> writes:
> On Thu, Dec 03, 2026 at 01:20:54PM +0100, Guillaume Vincke wrote:
>> At the moment, NBD client internals cannot be accessed. Therefore,
>> tests have to infer the client state from I/O results and wait with
>> sleeps, which is racy.
>>
>> Add the x-debug-query-nbd-client QMP command that reports the state of
>> the client's connection and of its connector. Other fields will be
>> added when needed.
>>
>> Signed-off-by: Guillaume Vincke <guillaume.vincke@ovhcloud.com>
>> Acked-by: Markus Armbruster <armbru@redhat.com>
>> ---
>> qapi/block-core.json | 87 +++++++++++++++++++++++++++++++++++++++++
>> include/block/nbd.h | 4 ++
>> block/nbd.c | 84 +++++++++++++++++++++++++--------------
>> nbd/client-connection.c | 22 +++++++++++
>> 4 files changed, 168 insertions(+), 29 deletions(-)
>>
>
>> @@ -74,7 +69,7 @@ typedef struct BDRVNBDState {
>> * reconnect_delay_timer.
>> */
>> QemuMutex requests_lock;
>> - NBDClientState state;
>> + NbdClientState state;
>
> Side effect of the QAPI enum naming rules. NBD is an acronym (Network
> Block Device) so I favor the all-caps where it is easy, but I'm not
> too fussed to see the mixed-case version. I don't know off-hand if the
> QAPI generator has a magic knob for listing well-known acronyms that
> should remain uppercase even when converting the rest of a name to the
> expected conventions of its usage
It doesn't.
> (a quick 'git grep -i acronym
> scripts/qapi' had no hits); but I also see no reason why we would need
> to implement one just to prevent this change in case.
StudlyCaps has created so much pain in the QAPI generator that I'm more
than happy to spread it around some. If you're bored, read commit
7b29353fdd93d062ff944785ef46fce4dd8d07c7.
Consistently separating words by spaces became a general custom
about the tenth century A.D., and lasted until about 1957, when
FORTRAN abandoned the practice.
-- Sun FORTRAN Reference Manual
> Reviewed-by: Eric Blake <eblake@redhat.com>
next prev parent reply other threads:[~2026-12-04 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 12:20 [PATCH v4 0/2] nbd: Add an unstable query for the client state Guillaume Vincke
2026-12-03 12:20 ` [PATCH v4 1/2] " Guillaume Vincke
2026-12-03 18:41 ` Eric Blake
2026-12-04 9:40 ` Markus Armbruster [this message]
2026-12-03 12:20 ` [PATCH v4 2/2] iotests: Add coverage for x-debug-query-nbd-client QMP command Guillaume Vincke
2026-12-03 18:42 ` 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=87bj718jun.fsf@pond.sub.org \
--to=armbru@pond.sub.org \
--cc=eblake@redhat.com \
--cc=guillaume.vincke@ovhcloud.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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.