Skip to content

block/graph-lock: Disable locking for now

Kevin Wolf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3graph-lock: Disable locking for nowblock/graph-lock.c+21 -01 reply
2/3nbd/server: Fix drained_poll to wake coroutine in right AioContextinclude/io/channel.h io/channel.c nbd/server.c+38 -81 reply
3/3iotests: Test commit with iothreads and ongoing I/Otests/qemu-iotests/iotests.py tests/qemu-iotests/tests/graph-changes-while-io tests/qemu-iotests/tests/graph-changes-while-io.out+58 -61 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/3R-b
2/3R-b
3/3T-b R-b

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

Read the v1 thread

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

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(-)
Signature · 1 line
2.40.1