Skip to content

Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

Maxim Levitsky qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest13 patches 9 repliesIn review
  2. v59 patches 1 replySuperseded
  3. v49 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v37 patches6 repliesSuperseded
v27 patches16 repliesSuperseded
v14 patches13 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13qtest: rename qtest_qmp_receive to qtest_qmp_receive_dicttests/qtest/ahci-test.c tests/qtest/device-plug-test.c tests/qtest/drive_del-test.c +4 more+24 -241 reply
2/13qtest: Reintroduce qtest_qmp_receivetests/qtest/libqos/libqtest.h tests/qtest/libqtest.c+71 -14 replies
3/13qtest: switch users back to qtest_qmp_receivetests/qtest/ahci-test.c tests/qtest/device-plug-test.c tests/qtest/drive_del-test.c +5 more+41 -932 replies
4/13qdev: add "check if address free" callback for buseshw/core/qdev.c hw/net/virtio-net.c hw/sd/core.c +1 more+30 -50 replies
5/13scsi: switch to bus->check_addresshw/scsi/scsi-bus.c+75 -470 replies
6/13scsi/scsi_bus: switch search direction in scsi_device_findhw/scsi/scsi-bus.c+10 -20 replies
7/13device_core: use drain_call_rcu in in qmp_device_addqdev-monitor.c+12 -00 replies
8/13device-core: use RCU for list of children of a bushw/core/bus.c hw/core/qdev.c hw/scsi/scsi-bus.c +2 more+63 -290 replies
9/13device-core: use atomic_set on .realized propertyhw/core/qdev.c include/hw/qdev-core.h+20 -12 replies
10/13scsi/scsi-bus: scsi_device_find: don't return unrealized deviceshw/scsi/scsi-bus.c+53 -300 replies
11/13scsi/scsi_bus: Add scsi_device_gethw/scsi/scsi-bus.c include/hw/scsi/scsi.h+12 -00 replies
12/13virtio-scsi: use scsi_device_gethw/scsi/virtio-scsi.c+13 -80 replies
13/13scsi/scsi_bus: fix races in REPORT LUNShw/scsi/scsi-bus.c+33 -350 replies

Reviews trailers per patch

8 of 13 patches have a Reviewed-by or Acked-by.

PatchStefan HajnocziThomas Huth
1/13A-b
2/13
3/13
4/13
5/13
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13
12/13R-b
13/13R-b

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

Read the v7 thread

Cover letter [PATCH v7 00/13] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

This is the next version of the patches.

In this version I implemented Paulo's suggestion of fixing the qtests to cope with out of order events.

This resulted in small but nice refactoring.

Besides that, the only other change from V6 is that I dropped Paulo's fix to qtest_qmp_device_del since it is fixed now by my qtest patches.

The iotest 67 still fails with this, something that Paulo is looking to fix before merging this.

Best regards,
Maxim Levitsky

Maxim Levitsky (10):
qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
qtest: Reintroduce qtest_qmp_receive
qtest: switch users back to qtest_qmp_receive scsi/scsi_bus: switch search direction in scsi_device_find
device_core: use drain_call_rcu in in qmp_device_add
device-core: use RCU for list of children of a bus
device-core: use atomic_set on .realized property scsi/scsi_bus: Add scsi_device_get
virtio-scsi: use scsi_device_get
scsi/scsi_bus: fix races in REPORT LUNS

Paolo Bonzini (3):
qdev: add "check if address free" callback for buses
scsi: switch to bus->check_address
scsi/scsi-bus: scsi_device_find: don't return unrealized devices

 hw/core/bus.c                   |  28 ++--
 hw/core/qdev.c                  |  73 ++++++---
 hw/net/virtio-net.c             |   2 +-
 hw/scsi/scsi-bus.c              | 262 ++++++++++++++++++++------------
 hw/scsi/virtio-scsi.c           |  27 ++--
 hw/sd/core.c                    |   3 +-
 include/hw/qdev-core.h          |  24 ++-
 include/hw/scsi/scsi.h          |   1 +
 qdev-monitor.c                  |  12 ++
 tests/qtest/drive_del-test.c    |   9 +-
 tests/qtest/libqos/libqtest.h   |  34 +++--
 tests/qtest/libqtest.c          | 110 +++++++-------
 tests/qtest/migration-helpers.c |  25 ++-
 tests/qtest/pvpanic-test.c      |   4 +-
 tests/qtest/qmp-test.c          |  18 +--
 tests/qtest/tpm-util.c          |   8 +-
 16 files changed, 411 insertions(+), 229 deletions(-)
Signature · 1 line
2.26.2