]> git.proxmox.com Git - mirror_qemu.git/commit
virtio-blk: add lock to protect s->rq
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 14 Sep 2023 14:00:59 +0000 (10:00 -0400)
committerKevin Wolf <kwolf@redhat.com>
Thu, 21 Dec 2023 21:49:27 +0000 (22:49 +0100)
commit9c67f33fcab654d6b7f9f4236c5a21ea946e0931
tree305d87db8028e566d332a9249c2f686b1f6ed7ff
parentcd0c0db0aa905af9b72735d5ea40cb41206c7ca8
virtio-blk: add lock to protect s->rq

s->rq is accessed from IO_CODE and GLOBAL_STATE_CODE. Introduce a lock
to protect s->rq and eliminate reliance on the AioContext lock.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230914140101.1065008-3-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/virtio-blk.c
include/hw/virtio/virtio-blk.h