block: AioContext management, part 2
Status from this message: Applied to the block branch.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | test-block-iothread: Check filter node in test_propagate_mirrortests/ | +6 | 1 reply | |
| 2/15 | block: Add Error to blk_set_aio_context()block/ hw/ hw/ +4 more | +53 | 0 replies | |
| 3/15 | block: Add BlockBackend.ctxblock.c block/ block/ +29 more | +96 | 0 replies | |
| 4/15 | block: Add qdev_prop_drive_iothread property typehw/ include/ include/ | +46 | 0 replies | |
| 5/15 | scsi-disk: Use qdev_prop_drive_iothreadhw/ hw/ include/ +1 more | +25 | 0 replies | |
| 6/15 | block: Adjust AioContexts when attaching nodesblock.c block/ blockjob.c +2 more | +49 | 0 replies | |
| 7/15 | test-block-iothread: Test adding parent to iothread nodetests/ | +33 | 1 reply | |
| 8/15 | test-block-iothread: BlockBackend AioContext across root node changetests/ | +33 | 0 replies | |
| 9/15 | block: Move node without parents to main AioContextblock.c tests/ tests/ | +6 | 0 replies | |
| 10/15 | blockdev: Use bdrv_try_set_aio_context() for monitor commandsblockdev.c | +28 | 0 replies | |
| 11/15 | block: Remove wrong bdrv_set_aio_context() callsblock.c block/ block/ | +0 | 0 replies | |
| 12/15 | virtio-scsi-test: Test attaching new overlay with iothreadstests/ tests/ tests/ | +92 | 0 replies | |
| 13/15 | iotests: Attach new devices to node in non-default iothreadtests/ tests/ tests/ | +54 | 0 replies | |
| 14/15 | test-bdrv-drain: Use bdrv_try_set_aio_context()tests/ | +3 | 0 replies | |
| 15/15 | block: Remove bdrv_set_aio_context()block.c docs/ include/ | +16 | 0 replies |
Reviews trailers per patch
1 of 15 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Eric Blake |
|---|---|
| Series | R-b |
| 1/15 | R-b |
| 2/15 | |
| 3/15 | |
| 4/15 | |
| 5/15 | |
| 6/15 | |
| 7/15 | |
| 8/15 | |
| 9/15 | |
| 10/15 | |
| 11/15 | |
| 12/15 | |
| 13/15 | |
| 14/15 | |
| 15/15 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 00/15] block: AioContext management, part 2
Recently, a few bugs were reported that resulted from an inconsistent state regarding AioContexts. Block nodes can end up in different contexts than their users expect - the AioContext of a node can even change under the feet of a device with no way for the device to forbid this. We recently added a few basic checks to scsi-disk and virtio-blk, but they are by far not enough.
Part 1 solved the first half of the problem and made sure that AioContext changes are propagated through the graph as necessary, so that a bdrv_set_aio_context() correctly pulls everything that uses the node into the right context.
This is part 2 that fixes the second half: Attaching new child nodes where the parent and child are already in different AioContexts. This operation may only succeed if we can move one of the node into the context of the other node.
After applying this series, unchecked bdrv_set_aio_context() doesn't exist any more and all users call functions that make sure that the AioContext assignments across the graph stays consistent.
Kevin Wolf (15):
test-block-iothread: Check filter node in test_propagate_mirror
block: Add Error to blk_set_aio_context()
block: Add BlockBackend.ctx
block: Add qdev_prop_drive_iothread property type
scsi-disk: Use qdev_prop_drive_iothread
block: Adjust AioContexts when attaching nodes
test-block-iothread: Test adding parent to iothread node
test-block-iothread: BlockBackend AioContext across root node change
block: Move node without parents to main AioContext
blockdev: Use bdrv_try_set_aio_context() for monitor commands
block: Remove wrong bdrv_set_aio_context() calls
virtio-scsi-test: Test attaching new overlay with iothreads
iotests: Attach new devices to node in non-default iothread
test-bdrv-drain: Use bdrv_try_set_aio_context()
block: Remove bdrv_set_aio_context()
docs/devel/multiple-iothreads.txt | 4 +- include/block/block.h | 9 --- include/block/block_int.h | 1 + include/hw/block/block.h | 7 +- include/hw/qdev-properties.h | 3 + include/hw/scsi/scsi.h | 1 + include/sysemu/block-backend.h | 5 +- tests/libqtest.h | 11 ++++ block.c | 70 ++++++++++++++------ block/backup.c | 3 +- block/block-backend.c | 47 +++++++++----- block/commit.c | 13 ++-- block/crypto.c | 3 +- block/mirror.c | 4 +- block/parallels.c | 3 +- block/qcow.c | 3 +- block/qcow2.c | 6 +- block/qed.c | 3 +- block/sheepdog.c | 3 +- block/vdi.c | 3 +- block/vhdx.c | 3 +- block/vmdk.c | 3 +- block/vpc.c | 3 +- blockdev.c | 48 ++++++++------ blockjob.c | 12 +++- hmp.c | 3 +- hw/block/dataplane/virtio-blk.c | 12 +++- hw/block/dataplane/xen-block.c | 6 +- hw/block/fdc.c | 2 +- hw/block/xen-block.c | 2 +- hw/core/qdev-properties-system.c | 41 +++++++++++- hw/ide/qdev.c | 2 +- hw/scsi/scsi-disk.c | 24 ++++--- hw/scsi/virtio-scsi.c | 25 ++++--- migration/block.c | 3 +- nbd/server.c | 5 +- tests/libqtest.c | 19 ++++++ tests/test-bdrv-drain.c | 50 +++++++------- tests/test-bdrv-graph-mod.c | 5 +- tests/test-block-backend.c | 4 +- tests/test-block-iothread.c | 104 +++++++++++++++++++++++++----- tests/test-blockjob.c | 2 +- tests/test-throttle.c | 6 +- tests/virtio-scsi-test.c | 62 ++++++++++++++++++ tests/qemu-iotests/051 | 24 +++++++ tests/qemu-iotests/051.out | 3 + tests/qemu-iotests/051.pc.out | 27 ++++++++ tests/qemu-iotests/240.out | 2 +- 48 files changed, 531 insertions(+), 173 deletions(-)
Signature · 1 line
2.20.1