qemu/nbd
Stefan Hajnoczi 7075d23511 nbd/server: introduce NBDClient->lock to protect fields
NBDClient has a number of fields that are accessed by both the export
AioContext and the main loop thread. When the AioContext lock is removed
these fields will need another form of protection.

Add NBDClient->lock and protect fields that are accessed by both
threads. Also add assertions where possible and otherwise add doc
comments stating assumptions about which thread and lock holding.

Note this patch moves the client->recv_coroutine assertion from
nbd_co_receive_request() to nbd_trip() where client->lock is held.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20231221192452.1785567-7-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-12-21 21:59:10 +01:00
..
client-connection.c
client.c
common.c
meson.build
nbd-internal.h
server.c nbd/server: introduce NBDClient->lock to protect fields 2023-12-21 21:59:10 +01:00
trace-events nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS 2023-10-05 11:02:08 -05:00
trace.h