Skip to content

Acquire the AioContext during _realize()

Alberto Garcia qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 6 repliesIn review
  2. v16 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Patch 1: include a test case [Kevin]
- Patch 2: include a test case and extend the locking to protect more function calls [Kevin]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6block: Acquire the AioContext in virtio_blk_device_realize()hw/block/virtio-blk.c tests/qemu-iotests/236 tests/qemu-iotests/236.out +1 more+110 -70 replies
2/6block: Acquire the AioContext in scsi_*_realize()hw/scsi/scsi-disk.c tests/qemu-iotests/236 tests/qemu-iotests/236.out+93 -30 replies
3/6block: Acquire the AioContext in floppy_drive_realize()hw/block/fdc.c+11 -40 replies
4/6block: Acquire the AioContext in nvme_realize()hw/block/nvme.c+10 -30 replies
5/6block: Acquire the AioContext in ide_dev_initfn()hw/ide/qdev.c+12 -50 replies
6/6block: Acquire the AioContext in usb_msd_storage_realize()hw/usb/dev-storage.c+5 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/6] Acquire the AioContext during _realize()

This series acquires the AioContext in the _realize() functions of several devices before making use of their block backends. This fixes at least a couple of crashes (in virtio-blk and scsi). The other devices don't currently support iothreads so there's no crashes.

Berto

v2:
- Patch 1: include a test case [Kevin]
- Patch 2: include a test case and extend the locking to protect more function calls [Kevin]

v1: https://lists.gnu.org/archive/html/qemu-block/2019-01/msg00259.html
- Initial version

Output of 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/6:[0095] [FC] 'block: Acquire the AioContext in virtio_blk_device_realize()' 002/6:[0094] [FC] 'block: Acquire the AioContext in scsi_*_realize()' 003/6:[----] [--] 'block: Acquire the AioContext in floppy_drive_realize()' 004/6:[----] [--] 'block: Acquire the AioContext in nvme_realize()' 005/6:[----] [--] 'block: Acquire the AioContext in ide_dev_initfn()' 006/6:[----] [--] 'block: Acquire the AioContext in usb_msd_storage_realize()'

Alberto Garcia (6):
block: Acquire the AioContext in virtio_blk_device_realize()
block: Acquire the AioContext in scsi_*_realize()
block: Acquire the AioContext in floppy_drive_realize()
block: Acquire the AioContext in nvme_realize()
block: Acquire the AioContext in ide_dev_initfn()
block: Acquire the AioContext in usb_msd_storage_realize()

 hw/block/fdc.c             |  15 ++++--
 hw/block/nvme.c            |  13 +++--
 hw/block/virtio-blk.c      |  22 ++++++---
 hw/ide/qdev.c              |  17 +++++--
 hw/scsi/scsi-disk.c        |  23 +++++++--
 hw/usb/dev-storage.c       |   5 ++
 tests/qemu-iotests/236     | 121 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/236.out |  46 +++++++++++++++++
 tests/qemu-iotests/group   |   1 +
 9 files changed, 241 insertions(+), 22 deletions(-)
 create mode 100755 tests/qemu-iotests/236
 create mode 100644 tests/qemu-iotests/236.out
Signature · 1 line
2.11.0