diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2023-12-05 13:19:58 -0500 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2023-12-21 22:49:27 +0100 |
| commit | ed18b1ed4f34888872b5fbc2f217c65d62c95cfd (patch) | |
| tree | a62eff3b16c753d530e61e2098a88a0029872306 /util/async.c | |
| parent | e661a2470342d6fa873369c81988a19b1bb7b3f4 (diff) | |
| download | focaccia-qemu-ed18b1ed4f34888872b5fbc2f217c65d62c95cfd.tar.gz focaccia-qemu-ed18b1ed4f34888872b5fbc2f217c65d62c95cfd.zip | |
virtio-scsi: replace AioContext lock with tmf_bh_lock
Protect the Task Management Function BH state with a lock. The TMF BH runs in the main loop thread. An IOThread might process a TMF at the same time as the TMF BH is running. Therefore tmf_bh_list and tmf_bh must be protected by a lock. Run TMF request completion in the IOThread using aio_wait_bh_oneshot(). This avoids more locking to protect the virtqueue and SCSI layer state. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20231205182011.1976568-2-stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'util/async.c')
0 files changed, 0 insertions, 0 deletions