[PATCH 0/3] block/graph-lock: Disable locking for now

Kevin Wolf posted 3 patches 11 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230517152834.277483-1-kwolf@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eric Blake <eblake@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
include/io/channel.h                          | 10 ++++
block/graph-lock.c                            | 21 +++++++
io/channel.c                                  | 33 +++++++++--
nbd/server.c                                  |  3 +-
tests/qemu-iotests/iotests.py                 |  4 ++
.../qemu-iotests/tests/graph-changes-while-io | 56 +++++++++++++++++--
.../tests/graph-changes-while-io.out          |  4 +-
7 files changed, 117 insertions(+), 14 deletions(-)
[PATCH 0/3] block/graph-lock: Disable locking for now
Posted by Kevin Wolf 11 months, 3 weeks ago
tl;dr is that graph locking introduced deadlocks in 8.0, and disabling
it for now fixes them again. See patch 1 for the details.

I still intend the fix this properly before we remove the AioContext
lock (which is when the deadlock would be automatically solved), but
it's not trivial enough for something that would be ready now and
backportable to stable versions. Let's try the real thing again in 8.1
and fix 8.0 with this stopgap solution.

Patch 2 is a prerequisite for the test case. Instead of reproducing the
deadlock problem (which it unfortunately doesn't do reliably anyway, the
timing seems hard to get right), I got NBD server crashes without it. I
actually made some more NBD changes to fix the crashes before this one,
but it seems to be stable with only this. Maybe the rest only fixed
symptoms of the same root cause, I'll have another look at them.

Kevin Wolf (3):
  graph-lock: Disable locking for now
  nbd/server: Fix drained_poll to wake coroutine in right AioContext
  iotests: Test commit with iothreads and ongoing I/O

 include/io/channel.h                          | 10 ++++
 block/graph-lock.c                            | 21 +++++++
 io/channel.c                                  | 33 +++++++++--
 nbd/server.c                                  |  3 +-
 tests/qemu-iotests/iotests.py                 |  4 ++
 .../qemu-iotests/tests/graph-changes-while-io | 56 +++++++++++++++++--
 .../tests/graph-changes-while-io.out          |  4 +-
 7 files changed, 117 insertions(+), 14 deletions(-)

-- 
2.40.1