Skip to content

block: fix nbd-server-stop crash after blockdev-snapshot-sync

Stefan Hajnoczi qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2block: let blk_add/remove_aio_context_notifier() tolerate BDS changesblock/block-backend.c block/trace-events+65 -04 replies
2/2iotests: add 208 nbd-server + blockdev-snapshot-sync test casetests/qemu-iotests/208 tests/qemu-iotests/208.out tests/qemu-iotests/group+65 -09 replies

Reviews trailers per patch

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

PatchEric BlakeMax Reitz
1/2R-b R-b
2/2T-b R-b R-b

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

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] block: fix nbd-server-stop crash after blockdev-snapshot-sync

The blockdev-snapshot-sync command uses bdrv_append() to update all parents to point at the external snapshot node. This breaks BlockBackend's blk_add/remove_aio_context_notifier(), which doesn't expect a BDS change.

Patch 1 fixes this by tracking AioContext notifiers in BlockBackend.

See the test case in Patch 2 for a reproducer.

Stefan Hajnoczi (2):
block: let blk_add/remove_aio_context_notifier() tolerate BDS changes
iotests: add 208 nbd-server + blockdev-snapshot-sync test case

 block/block-backend.c      | 63 ++++++++++++++++++++++++++++++++++++++++++++++
 block/trace-events         |  2 ++
 tests/qemu-iotests/208     | 55 ++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/208.out |  9 +++++++
 tests/qemu-iotests/group   |  1 +
 5 files changed, 130 insertions(+)
 create mode 100755 tests/qemu-iotests/208
 create mode 100644 tests/qemu-iotests/208.out
Signature · 1 line
2.14.3