Skip to content

nbd: Several fixes

Max Reitz qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest25 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25util/uri: Add overflow check to rfc3986_parse_portutil/uri.c+14 -100 replies
2/25qemu-nbd: Detect unused partitions by system == 0qemu-nbd.c+4 -20 replies
3/25nbd: Fix nbd_establish_connection()'s return valueblock/nbd.c+1 -10 replies
4/25nbd: Fix response to invalid requestsnbd.c+1 -11 reply
5/25nbd: Avoid generic -EINVALnbd.c+25 -245 replies
6/25nbd: Pass return value from nbd_handle_list()nbd.c+4 -30 replies
7/25nbd: Add "failed to open export" error messagenbd.c tests/qemu-iotests/096.out+6 -22 replies
8/25nbd: Handle blk_getlength() failureblockdev-nbd.c include/block/nbd.h nbd.c +1 more+32 -61 reply
9/25qemu-nbd: fork() can failqemu-nbd.c+3 -10 replies
10/25nbd: Fix potential signed overflow issuesinclude/block/nbd.h qemu-nbd.c+5 -41 reply
11/25qemu-nbd: Fix and improve input verificationqemu-nbd.c+27 -132 replies
12/25nbd: Set block size to BDRV_SECTOR_SIZEblock/nbd-client.c block/nbd-client.h include/block/nbd.h +2 more+12 -160 replies
13/25nbd: Enforce sector alignmentnbd.c qemu-nbd.c+25 -00 replies
14/25coroutine: Add co_yield_timeout()include/block/coroutine.h qemu-coroutine-sleep.c+40 -00 replies
15/25coroutine-io: Return -errno in case of errorqemu-coroutine-io.c+1 -10 replies
16/25coroutine-io: Add I/O functions with timeoutinclude/qemu-common.h qemu-coroutine-io.c+53 -150 replies
17/25nbd: Employ timeoutsblock/nbd-client.c include/block/nbd.h nbd.c+43 -60 replies
18/25nbd: Fix nbd_receive_options()nbd.c+29 -200 replies
19/25nbd: Fix interpretation of the export flagsnbd.c+1 -10 replies
20/25block/nbd: Comment on discard/flush silently failingblock/nbd-client.c+2 -06 replies
21/25nbd: Drop unexpected data for NBD_OPT_LISTnbd.c+23 -00 replies
22/25iotests: Add _timeout functiontests/qemu-iotests/common.rc+16 -00 replies
23/25iotests: Add test for invalid qemu-nbd parameterstests/qemu-iotests/125 tests/qemu-iotests/125.out tests/qemu-iotests/group+91 -00 replies
24/25iotests: Add test for issuing discard over NBDtests/qemu-iotests/126 tests/qemu-iotests/126.out tests/qemu-iotests/group+134 -00 replies
25/25iotests: Add test for a non-existing NBD exporttests/qemu-iotests/127 tests/qemu-iotests/127.out tests/qemu-iotests/group+95 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/25] nbd: Several fixes

This series contains a variety of fixes for qemu's NBD code, with the most interesting (and probably most prone to be wrong) thing being a timeout of ten seconds for NBD connections.

Max Reitz (25):
util/uri: Add overflow check to rfc3986_parse_port
qemu-nbd: Detect unused partitions by system == 0
nbd: Fix nbd_establish_connection()'s return value
nbd: Fix response to invalid requests
nbd: Avoid generic -EINVAL
nbd: Pass return value from nbd_handle_list()
nbd: Add "failed to open export" error message
nbd: Handle blk_getlength() failure
qemu-nbd: fork() can fail
nbd: Fix potential signed overflow issues
qemu-nbd: Fix and improve input verification
nbd: Set block size to BDRV_SECTOR_SIZE
nbd: Enforce sector alignment
coroutine: Add co_yield_timeout()
coroutine-io: Return -errno in case of error
coroutine-io: Add I/O functions with timeout
nbd: Employ timeouts
nbd: Fix nbd_receive_options()
nbd: Fix interpretation of the export flags block/nbd: Comment on discard/flush silently failing
nbd: Drop unexpected data for NBD_OPT_LIST
iotests: Add _timeout function
iotests: Add test for invalid qemu-nbd parameters
iotests: Add test for issuing discard over NBD
iotests: Add test for a non-existing NBD export

 block/nbd-client.c           |  40 +++++++--
 block/nbd-client.h           |   1 -
 block/nbd.c                  |   2 +-
 blockdev-nbd.c               |   6 +-
 include/block/coroutine.h    |   6 ++
 include/block/nbd.h          |  13 +--
 include/qemu-common.h        |  45 ++++++++--
 nbd.c                        | 203 ++++++++++++++++++++++++++++++-------------
 qemu-coroutine-io.c          |  25 ++++--
 qemu-coroutine-sleep.c       |  34 ++++++++
 qemu-nbd.c                   |  74 +++++++++++-----
 tests/qemu-iotests/096.out   |   2 +-
 tests/qemu-iotests/125       |  69 +++++++++++++++
 tests/qemu-iotests/125.out   |  21 +++++
 tests/qemu-iotests/126       | 105 ++++++++++++++++++++++
 tests/qemu-iotests/126.out   |  28 ++++++
 tests/qemu-iotests/127       |  80 +++++++++++++++++
 tests/qemu-iotests/127.out   |  14 +++
 tests/qemu-iotests/common.rc |  16 ++++
 tests/qemu-iotests/group     |   3 +
 util/uri.c                   |  24 ++---
 21 files changed, 686 insertions(+), 125 deletions(-)
 create mode 100755 tests/qemu-iotests/125
 create mode 100644 tests/qemu-iotests/125.out
 create mode 100755 tests/qemu-iotests/126
 create mode 100644 tests/qemu-iotests/126.out
 create mode 100755 tests/qemu-iotests/127
 create mode 100644 tests/qemu-iotests/127.out
Signature · 1 line
2.1.0