Skip to content

nbd: Drop BDS backpointer

Max Reitz qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Rename all functions which now take a BlockDriverState * instead of an NbdClientSession * from nbd_client_session_* to nbd_client_* [Paolo]
- Rename nbd_client_close() in nbd.c to client_close() and make it static; otherwise, it would conflict with the "new" nbd_client_close() in block/nbd-client.c

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3nbd: Drop BDS backpointerblock/nbd-client.c block/nbd-client.h block/nbd.c +2 more+87 -941 reply
2/3iotests: Add "wait" functionality to _cleanup_qemutests/qemu-iotests/common.qemu+11 -13 replies
3/3iotests: Add test for drive-mirror with NBD targettests/qemu-iotests/094 tests/qemu-iotests/094.out tests/qemu-iotests/group+93 -00 replies

Reviews trailers per patch

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

PatchPaolo Bonzini
1/3R-b
2/3R-b
3/3R-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/3] nbd: Drop BDS backpointer

Right now, bdrv_swap() on NBD BDSs results in a segmentation fault pretty much all of the time. This series fixes this.

Note that this is not a common case, as bdrv_swap() is generally only performed on root BDSs (there are exceptions, though) and NBD BDSs normally have a format BDS above them. However, due to misconfiguration (or maybe it is not even a misconfiguration, but just a strange configuration) these cases may indeed occur.

I took the second patch in this series from my other series "block: Rework bdrv_close_all()" (which has 21 patches itself and depends on 64 other patches, so making this series rely on that one probably would not have been a very good idea).

v2:
- Rename all functions which now take a BlockDriverState * instead of an NbdClientSession * from nbd_client_session_* to nbd_client_* [Paolo]
- Rename nbd_client_close() in nbd.c to client_close() and make it static; otherwise, it would conflict with the "new" nbd_client_close() in block/nbd-client.c

git-backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/3:[0089] [FC] 'nbd: Drop BDS backpointer'
002/3:[----] [--] 'iotests: Add "wait" functionality to _cleanup_qemu' 003/3:[----] [--] 'iotests: Add test for drive-mirror with NBD target'

Max Reitz (3):
nbd: Drop BDS backpointer
iotests: Add "wait" functionality to _cleanup_qemu
iotests: Add test for drive-mirror with NBD target

 block/nbd-client.c             | 101 +++++++++++++++++++++--------------------
 block/nbd-client.h             |  34 +++++++-------
 block/nbd.c                    |  37 ++++++---------
 include/block/nbd.h            |   1 -
 nbd.c                          |   8 ++--
 tests/qemu-iotests/094         |  81 +++++++++++++++++++++++++++++++++
 tests/qemu-iotests/094.out     |  11 +++++
 tests/qemu-iotests/common.qemu |  12 ++++-
 tests/qemu-iotests/group       |   1 +
 9 files changed, 191 insertions(+), 95 deletions(-)
 create mode 100755 tests/qemu-iotests/094
 create mode 100644 tests/qemu-iotests/094.out
Signature · 1 line
2.1.0