All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] nbd: Add an unstable query for the client state
@ 2026-11-09 16:06 Guillaume Vincke
  2026-11-09 16:06 ` [PATCH 1/2] " Guillaume Vincke
  2026-11-09 16:06 ` [PATCH 2/2] iotests: Make nbd-stale-connection test deterministic Guillaume Vincke
  0 siblings, 2 replies; 8+ messages in thread
From: Guillaume Vincke @ 2026-11-09 16:06 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 optional
connector field is used to give the NBD client connection thread
details only when relevant, i.e. when 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.

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                       | 18 +++++
 qapi/block-core.json                          | 79 +++++++++++++++++++
 tests/qemu-iotests/tests/nbd-stale-connection | 17 ++--
 5 files changed, 175 insertions(+), 5 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-11-12 17:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 16:06 [PATCH 0/2] nbd: Add an unstable query for the client state Guillaume Vincke
2026-11-09 16:06 ` [PATCH 1/2] " Guillaume Vincke
2026-11-10 12:53   ` Markus Armbruster
2026-11-10 15:07     ` guillaume vincke
2026-11-10 15:51       ` Eric Blake
2026-11-11 14:22       ` Markus Armbruster
2026-11-12 17:27         ` guillaume vincke
2026-11-09 16:06 ` [PATCH 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.