All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] nbd: Add an unstable query for the client state
@ 2026-11-13 14:08 Guillaume Vincke
  2026-11-13 14:08 ` [PATCH v2 1/2] " Guillaume Vincke
  2026-11-13 14:08 ` [PATCH v2 2/2] iotests: Make nbd-stale-connection test deterministic Guillaume Vincke
  0 siblings, 2 replies; 4+ messages in thread
From: Guillaume Vincke @ 2026-11-13 14:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, eblake, vsementsov, kwolf, hreitz, armbru,
	Guillaume Vincke

Based-on: <20261105164124.249395-1-guillaume.vincke@ovhcloud.com>

These changes follow the discussion on:
https://patchew.org/QEMU/20261105164124.249395-1-guillaume.vincke@ovhcloud.com/#au4tsMuhKjq62dVB@redhat.com
Even though Eric Blake suggested a query for NBD server state,
considering the nbd-stale-connection test we are trying to make
deterministic relies on qemu-nbd, which does not have QMP, this
patchset adds a command to query the NBD client state.

The created QMP command output lists the client internals. The
connector field is used to give the NBD client connection thread
details, i.e. when idle, running or when a channel is ready to be
picked up. Other fields such as in-flight or negotiated size can easily
be added at the top level while others like the connector's last error
would be added into the connector one.

Considering this command accesses the client's private state, it is
implemented in block/nbd.c where BDRVNBDState is defined.

v1: https://patchew.org/QEMU/20261109160609.1434289-1-guillaume.vincke@ovhcloud.com

v1 -> v2:
- patch 1: Connector is now always present, with an idle state. Read
client and connector states under the same lock. Add the NBD state
information to the QMP documentation. Fix documentation wording and
version number.
- patch 2: Simplify the connector lookup using the new QMP command
output.

Guillaume Vincke (2):
  nbd: Add an unstable query for the client state
  iotests: Make nbd-stale-connection test deterministic

 block/nbd.c                                   | 57 ++++++++++++
 include/block/nbd.h                           |  9 ++
 nbd/client-connection.c                       | 22 +++++
 qapi/block-core.json                          | 87 +++++++++++++++++++
 tests/qemu-iotests/tests/nbd-stale-connection | 17 ++--
 5 files changed, 187 insertions(+), 5 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-11-16 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 14:08 [PATCH v2 0/2] nbd: Add an unstable query for the client state Guillaume Vincke
2026-11-13 14:08 ` [PATCH v2 1/2] " Guillaume Vincke
2026-11-16 10:39   ` Markus Armbruster
2026-11-13 14:08 ` [PATCH v2 2/2] iotests: Make nbd-stale-connection test deterministic Guillaume Vincke

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.