qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-4.0 00/14] nbd: add qemu-nbd --list
@ 2018-11-30 22:03 Eric Blake
  2018-11-30 22:03 ` [Qemu-devel] [PATCH 01/14] qemu-nbd: Use program name in error messages Eric Blake
                   ` (14 more replies)
  0 siblings, 15 replies; 65+ messages in thread
From: Eric Blake @ 2018-11-30 22:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: jsnow, nsoffer, rjones, vsementsov, qemu-block

I got tired of debugging whether a server was advertising the
correct things during negotiation by inspecting the trace
logs of qemu-io as client - not to mention that without SOME
sort of client tracing particular commands, we can't easily
regression test the server for correct behavior.  The final
straw was at KVM Forum, when Nir asked me to make sure there
was a way to easily determine if an NBD server is exposing what
we really want (and fixing x-dirty-bitmap to behave saner fell
out as a result of answering that question).

I note that upstream NBD has 'nbd-client -l $host' for querying
just export names (with no quoting, so you have to know that
a blank line means the default export), but it wasn't powerful
enough, so I implemented 'qemu-nbd -L' to document everything.
Upstream NBD has separate 'nbd-client' and 'nbd-server' binaries,
while we only have 'qemu-nbd' (which is normally just a server,
but 'qemu-nbd -c' also operates a second thread as a client).
Our other uses of qemu as NBD client are for consuming a block
device (as in qemu-io, qemu-img, or a drive to qemu) - but those
binaries are less suited to something so specific to the NBD
protocol.

Bonus: As a result of my work on this series, nbdkit now supports
NBD_OPT_INFO (my interoperability testing between server
implementations has been paying off, both at fixing server bugs,
and at making this code more reliable across difference in valid
servers).

Based-on: <20181130023232.3079982-1-eblake@redhat.com>
[0/3] NBD dirty bitmap cleanups

(well, only weakly based on it - the two series can be applied
in either order, where if you apply this series but revert 12/14,
then iotest 223 in 14/14 will expose the bug fixed by patch 1/3
in the other series)

Also available at:
https://repo.or.cz/qemu/ericb.git qemu-nbd-list-v1

Eric Blake (14):
  qemu-nbd: Use program name in error messages
  nbd/client: More consistent error messages
  qemu-nbd: Fail earlier for -c/-d on non-linux
  qemu-nbd: Simplify --partition handling
  nbd/client: Drop pointless buf variable
  nbd/client: Move export name into NBDExportInfo
  nbd/client: Refactor nbd_negotiate_simple_meta_context()
  nbd/client: Refactor nbd_receive_list()
  nbd/client: Refactor return of nbd_receive_negotiate()
  nbd/client: Split handshake into two functions
  nbd/client: Add nbd_receive_export_list()
  nbd/client: Work around 3.0 bug for listing meta contexts
  qemu-nbd: Add --list option
  iotests: Enhance 223, 233 to cover 'qemu-nbd --list'

 include/block/nbd.h        |  23 +-
 nbd/nbd-internal.h         |   1 +
 block/nbd-client.c         |   5 +-
 nbd/client.c               | 595 +++++++++++++++++++++++++------------
 qemu-nbd.c                 | 196 ++++++++++--
 nbd/trace-events           |   8 +-
 tests/qemu-iotests/223     |   2 +
 tests/qemu-iotests/223.out |  20 ++
 tests/qemu-iotests/233     |  10 +
 tests/qemu-iotests/233.out |  17 +-
 10 files changed, 650 insertions(+), 227 deletions(-)

-- 
2.17.2

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

end of thread, other threads:[~2018-12-10 22:28 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-30 22:03 [Qemu-devel] [PATCH for-4.0 00/14] nbd: add qemu-nbd --list Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 01/14] qemu-nbd: Use program name in error messages Eric Blake
2018-11-30 22:17   ` Richard W.M. Jones
2018-12-05 14:55   ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 02/14] nbd/client: More consistent " Eric Blake
2018-11-30 22:20   ` Richard W.M. Jones
2018-12-05 15:03   ` Vladimir Sementsov-Ogievskiy
2018-12-10 22:03     ` Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 03/14] qemu-nbd: Fail earlier for -c/-d on non-linux Eric Blake
2018-11-30 22:23   ` Richard W.M. Jones
2018-12-05 15:20   ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 04/14] qemu-nbd: Simplify --partition handling Eric Blake
2018-11-30 22:26   ` Richard W.M. Jones
2018-11-30 22:41     ` Eric Blake
2018-12-05 15:40   ` Vladimir Sementsov-Ogievskiy
2018-12-05 16:26     ` Eric Blake
2018-12-05 16:32       ` Eric Blake
2018-12-10 22:28   ` Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 05/14] nbd/client: Drop pointless buf variable Eric Blake
2018-11-30 22:30   ` Richard W.M. Jones
2018-11-30 22:54     ` Eric Blake
2018-12-05 15:59   ` Vladimir Sementsov-Ogievskiy
2018-12-05 16:29     ` Eric Blake
2018-12-05 16:38       ` Vladimir Sementsov-Ogievskiy
2018-12-05 16:49         ` Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 06/14] nbd/client: Move export name into NBDExportInfo Eric Blake
2018-11-30 22:34   ` Richard W.M. Jones
2018-12-05 17:26   ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 07/14] nbd/client: Refactor nbd_negotiate_simple_meta_context() Eric Blake
2018-12-01 10:30   ` Richard W.M. Jones
2018-12-06 13:20   ` Vladimir Sementsov-Ogievskiy
2018-12-06 16:20     ` Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 08/14] nbd/client: Refactor nbd_receive_list() Eric Blake
2018-12-01 10:37   ` Richard W.M. Jones
2018-12-06 14:18   ` Vladimir Sementsov-Ogievskiy
2018-12-06 16:31     ` Eric Blake
2018-12-06 17:03       ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 09/14] nbd/client: Refactor return of nbd_receive_negotiate() Eric Blake
2018-11-30 22:41   ` Richard W.M. Jones
2018-12-06 14:24   ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 10/14] nbd/client: Split handshake into two functions Eric Blake
2018-12-01 10:41   ` Richard W.M. Jones
2018-12-06 15:16   ` Vladimir Sementsov-Ogievskiy
2018-12-06 17:06     ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 11/14] nbd/client: Add nbd_receive_export_list() Eric Blake
2018-12-01 10:45   ` Richard W.M. Jones
2018-12-07 10:04   ` Vladimir Sementsov-Ogievskiy
2018-12-07 15:19     ` Eric Blake
2018-12-07 10:07   ` Vladimir Sementsov-Ogievskiy
2018-11-30 22:03 ` [Qemu-devel] [PATCH 12/14] nbd/client: Work around 3.0 bug for listing meta contexts Eric Blake
2018-12-07 11:21   ` Vladimir Sementsov-Ogievskiy
2018-12-07 15:21     ` Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 13/14] qemu-nbd: Add --list option Eric Blake
2018-12-01 10:58   ` Richard W.M. Jones
2018-12-07 12:48   ` Vladimir Sementsov-Ogievskiy
2018-12-07 15:36     ` Eric Blake
2018-12-07 16:49       ` Vladimir Sementsov-Ogievskiy
2018-12-07 16:49       ` Vladimir Sementsov-Ogievskiy
2018-12-07 16:59         ` Eric Blake
2018-11-30 22:03 ` [Qemu-devel] [PATCH 14/14] iotests: Enhance 223, 233 to cover 'qemu-nbd --list' Eric Blake
2018-12-01 11:04   ` Richard W.M. Jones
2018-12-07 13:08   ` Vladimir Sementsov-Ogievskiy
2018-12-01  7:42 ` [Qemu-devel] [PATCH for-4.0 00/14] nbd: add qemu-nbd --list Richard W.M. Jones
2018-12-01 13:57   ` Eric Blake
2018-12-01 15:00     ` Richard W.M. Jones

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).