[PATCH v8 00/17] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

Paolo Bonzini posted 17 patches 3 years, 6 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201007115700.707938-1-pbonzini@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Fam Zheng <fam@euphon.net>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Jason Wang <jasowang@redhat.com>, Stefan Berger <stefanb@linux.ibm.com>, Max Reitz <mreitz@redhat.com>, Markus Armbruster <armbru@redhat.com>
.gitlab-ci.yml                  |   2 +-
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 +
softmmu/qdev-monitor.c          |  12 +
tests/qemu-iotests/067          | 157 ------------
tests/qemu-iotests/067.out      | 414 --------------------------------
tests/qemu-iotests/group        |   1 -
tests/qtest/device-plug-test.c  |  32 +--
tests/qtest/drive_del-test.c    | 244 ++++++++++++++++---
tests/qtest/libqos/libqtest.h   |  34 +--
tests/qtest/libqtest.c          | 110 +++++----
tests/qtest/meson.build         |   4 +-
tests/qtest/migration-helpers.c |  25 +-
tests/qtest/pvpanic-test.c      |   4 +-
tests/qtest/qmp-test.c          |  18 +-
tests/qtest/tpm-util.c          |   8 +-
22 files changed, 637 insertions(+), 848 deletions(-)
delete mode 100755 tests/qemu-iotests/067
delete mode 100644 tests/qemu-iotests/067.out
[PATCH v8 00/17] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread
Posted by Paolo Bonzini 3 years, 6 months ago
Hopefully the final version of the patches, fixing the remaining
testsuite issues.  Kevin or Max, please take a look at patches 6 and 7
as they affect qemu-iotests.

Paolo

Maxim Levitsky (11):
  qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
  qtest: Reintroduce qtest_qmp_receive
  qtest: remove qtest_qmp_receive_success
  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 (6):
  device-plug-test: use qtest_qmp to send the device_del command
  qtest: check that drives are really appearing and disappearing
  qemu-iotests, qtest: rewrite test 067 as a qtest
  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

 .gitlab-ci.yml                  |   2 +-
 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 +
 softmmu/qdev-monitor.c          |  12 +
 tests/qemu-iotests/067          | 157 ------------
 tests/qemu-iotests/067.out      | 414 --------------------------------
 tests/qemu-iotests/group        |   1 -
 tests/qtest/device-plug-test.c  |  32 +--
 tests/qtest/drive_del-test.c    | 244 ++++++++++++++++---
 tests/qtest/libqos/libqtest.h   |  34 +--
 tests/qtest/libqtest.c          | 110 +++++----
 tests/qtest/meson.build         |   4 +-
 tests/qtest/migration-helpers.c |  25 +-
 tests/qtest/pvpanic-test.c      |   4 +-
 tests/qtest/qmp-test.c          |  18 +-
 tests/qtest/tpm-util.c          |   8 +-
 22 files changed, 637 insertions(+), 848 deletions(-)
 delete mode 100755 tests/qemu-iotests/067
 delete mode 100644 tests/qemu-iotests/067.out

-- 
2.26.2


Re: [PATCH v8 00/17] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread
Posted by no-reply@patchew.org 3 years, 6 months ago
Patchew URL: https://patchew.org/QEMU/20201007115700.707938-1-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20201007115700.707938-1-pbonzini@redhat.com
Subject: [PATCH v8 00/17] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20201007115700.707938-1-pbonzini@redhat.com -> patchew/20201007115700.707938-1-pbonzini@redhat.com
Switched to a new branch 'test'
7e51a35 scsi/scsi_bus: fix races in REPORT LUNS
3ba554c virtio-scsi: use scsi_device_get
caa2894 scsi/scsi_bus: Add scsi_device_get
8d7483b scsi/scsi-bus: scsi_device_find: don't return unrealized devices
8002737 device-core: use atomic_set on .realized property
d91937f scsi: switch to bus->check_address
562a123 device-core: use RCU for list of children of a bus
6bc4617 device_core: use drain_call_rcu in in qmp_device_add
97fbf85 scsi/scsi_bus: switch search direction in scsi_device_find
bb3b68e qdev: add "check if address free" callback for buses
adf9e3e qemu-iotests, qtest: rewrite test 067 as a qtest
093627d qtest: check that drives are really appearing and disappearing
80856de qtest: switch users back to qtest_qmp_receive
c96d5f0 device-plug-test: use qtest_qmp to send the device_del command
f1f04d9 qtest: remove qtest_qmp_receive_success
1148ec4 qtest: Reintroduce qtest_qmp_receive
20e3183 qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict

=== OUTPUT BEGIN ===
1/17 Checking commit 20e3183ecbd8 (qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict)
2/17 Checking commit 1148ec4900a6 (qtest: Reintroduce qtest_qmp_receive)
3/17 Checking commit f1f04d9c2320 (qtest: remove qtest_qmp_receive_success)
4/17 Checking commit c96d5f0aa32b (device-plug-test: use qtest_qmp to send the device_del command)
WARNING: line over 80 characters
#33: FILE: tests/qtest/device-plug-test.c:23:
+                     "{'execute': 'device_del', 'arguments': { 'id': %s } }", id);

total: 0 errors, 1 warnings, 76 lines checked

Patch 4/17 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
5/17 Checking commit 80856deb548d (qtest: switch users back to qtest_qmp_receive)
6/17 Checking commit 093627d21203 (qtest: check that drives are really appearing and disappearing)
7/17 Checking commit adf9e3ea2b0c (qemu-iotests, qtest: rewrite test 067 as a qtest)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#43: 
deleted file mode 100755

WARNING: line over 80 characters
#646: FILE: tests/qtest/drive_del-test.c:19:
+static bool look_for_drive0(QTestState *qts, const char *command, const char *key)

total: 0 errors, 2 warnings, 308 lines checked

Patch 7/17 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/17 Checking commit bb3b68e3507e (qdev: add "check if address free" callback for buses)
9/17 Checking commit 97fbf857acae (scsi/scsi_bus: switch search direction in scsi_device_find)
10/17 Checking commit 6bc461779d34 (device_core: use drain_call_rcu in in qmp_device_add)
11/17 Checking commit 562a12390903 (device-core: use RCU for list of children of a bus)
12/17 Checking commit d91937ffcb2f (scsi: switch to bus->check_address)
ERROR: code indent should never use tabs
#55: FILE: hw/scsi/scsi-bus.c:137:
+^I^I^I^I     int channel, int target, int lun,$

ERROR: code indent should never use tabs
#56: FILE: hw/scsi/scsi-bus.c:138:
+^I^I^I^I     SCSIDevice **p_dev)$

WARNING: line over 80 characters
#71: FILE: hw/scsi/scsi-bus.c:153:
+static bool scsi_bus_check_address(BusState *qbus, DeviceState *qdev, Error **errp)

WARNING: line over 80 characters
#91: FILE: hw/scsi/scsi-bus.c:173:
+        if (!scsi_bus_is_address_free(bus, dev->channel, dev->id, dev->lun, &d)) {

WARNING: line over 80 characters
#130: FILE: hw/scsi/scsi-bus.c:195:
+            is_free = scsi_bus_is_address_free(bus, dev->channel, ++id, dev->lun, NULL);

WARNING: line over 80 characters
#143: FILE: hw/scsi/scsi-bus.c:205:
+            is_free = scsi_bus_is_address_free(bus, dev->channel, dev->id, ++lun, NULL);

total: 2 errors, 4 warnings, 182 lines checked

Patch 12/17 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

13/17 Checking commit 8002737303c9 (device-core: use atomic_set on .realized property)
14/17 Checking commit 8d7483be0fd9 (scsi/scsi-bus: scsi_device_find: don't return unrealized devices)
15/17 Checking commit caa289460be6 (scsi/scsi_bus: Add scsi_device_get)
16/17 Checking commit 3ba554cd4f48 (virtio-scsi: use scsi_device_get)
17/17 Checking commit 7e51a3563abe (scsi/scsi_bus: fix races in REPORT LUNS)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20201007115700.707938-1-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com