Skip to content

various NBD fixes for 2.11

Eric Blake qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 13 repliesIn review
  2. v18 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7nbd-client: Fix error message typosblock/nbd-client.c+3 -32 replies
2/7nbd-client: Refuse read-only client with BDRV_O_RDWRblock/nbd-client.c tests/qemu-iotests/147+10 -04 replies
3/7nbd/client: Nicer trace of structured replynbd/client.c nbd/trace-events+4 -21 reply
4/7nbd: Fix struct name for structured readsinclude/block/nbd.h nbd/server.c+14 -61 reply
5/7nbd-client: Short-circuit 0-length operationsblock/nbd-client.c+10 -12 replies
6/7nbd-client: Stricter enforcing of structured reply specblock/nbd-client.c+9 -32 replies
7/7nbd/server: Fix structured read of length 0nbd/server.c nbd/trace-events+21 -11 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchVladimir Sementsov-Ogievskiy
1/7R-b
2/7R-b R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/7] various NBD fixes for 2.11

Sparked by my question on whether we were handling zero-length reads correctly according to the NBD spec, but grew to fix other things as well such as some typos, tracing weaknesses, and better handling of read-only exports.

The order these patches are listed here is bisection-friendly, but applying the patches out of order is necessary to catch some of the bad behavior being fixed.

As evidenced by the iotest 147 change, this WILL flag existing clients with dodgy usage when connecting to a read-only server (such as the default for nbd-server-add). But on the bright side, when libvirt drives storage migration via NBD, it is properly setting up a read-write server with nbd-server-add.

Since v1 (https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg00955.html):
- Tweak several commit messages now that NBD spec changes landed
- merge old 3/8 and 4/8 into single 2/7 that blocks read-write connection to read-only export rather than magically downgrading it [Kevin]

001/7:[----] [--] 'nbd-client: Fix error message typos' 002/7:[down] 'nbd-client: Refuse read-only client with BDRV_O_RDWR' 003/7:[----] [--] 'nbd/client: Nicer trace of structured reply' 004/7:[----] [--] 'nbd: Fix struct name for structured reads' 005/7:[----] [-C] 'nbd-client: Short-circuit 0-length operations' 006/7:[----] [--] 'nbd-client: Stricter enforcing of structured reply spec' 007/7:[----] [--] 'nbd/server: Fix structured read of length 0'

Eric Blake (7):
nbd-client: Fix error message typos
nbd-client: Refuse read-only client with BDRV_O_RDWR nbd/client: Nicer trace of structured reply
nbd: Fix struct name for structured reads
nbd-client: Short-circuit 0-length operations
nbd-client: Stricter enforcing of structured reply spec nbd/server: Fix structured read of length 0

 include/block/nbd.h    | 18 +++++++++++++-----
 block/nbd-client.c     | 38 +++++++++++++++++++++++++++++++-------
 nbd/client.c           |  4 +++-
 nbd/server.c           | 23 +++++++++++++++++++++--
 nbd/trace-events       |  3 ++-
 tests/qemu-iotests/147 |  1 +
 6 files changed, 71 insertions(+), 16 deletions(-)
Signature · 1 line
2.13.6