aboutsummaryrefslogtreecommitdiff
path: root/replay/replay-time.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-12-21 14:24:52 -0500
committerKevin Wolf <kwolf@redhat.com>2023-12-21 21:59:10 +0100
commit7075d235114b40b30524cf1c5b61906c0bbf5f4d (patch)
tree4d1f64987fcc81d60158cd103bfad42a574145ba /replay/replay-time.c
parentf816310d0c32c8482e56807ea0f9faa8d1b5f696 (diff)
downloadqemu-7075d235114b40b30524cf1c5b61906c0bbf5f4d.zip
qemu-7075d235114b40b30524cf1c5b61906c0bbf5f4d.tar.gz
qemu-7075d235114b40b30524cf1c5b61906c0bbf5f4d.tar.bz2
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>
Diffstat (limited to 'replay/replay-time.c')
0 files changed, 0 insertions, 0 deletions