diff options
author | Hanna Czenczek <hreitz@redhat.com> | 2024-02-02 15:47:54 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2024-02-07 14:55:25 +0100 |
commit | ad893672027ffe26db498947d70cde6d4f58a111 (patch) | |
tree | 1dc29fb4e576dfe9239c1a631b866c5a9f729944 /hw/scsi | |
parent | 1f25c172f83704e350c0829438d832384084a74d (diff) | |
download | qemu-ad893672027ffe26db498947d70cde6d4f58a111.zip qemu-ad893672027ffe26db498947d70cde6d4f58a111.tar.gz qemu-ad893672027ffe26db498947d70cde6d4f58a111.tar.bz2 |
block-backend: Allow concurrent context changes
Since AioContext locks have been removed, a BlockBackend's AioContext
may really change at any time (only exception is that it is often
confined to a drained section, as noted in this patch). Therefore,
blk_get_aio_context() cannot rely on its root node's context always
matching that of the BlockBackend.
In practice, whether they match does not matter anymore anyway: Requests
can be sent to BDSs from any context, so anyone who requests the BB's
context should have no reason to require the root node to have the same
context. Therefore, we can and should remove the assertion to that
effect.
In addition, because the context can be set and queried from different
threads concurrently, it has to be accessed with atomic operations.
Buglink: https://issues.redhat.com/browse/RHEL-19381
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-ID: <20240202144755.671354-2-hreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi')
0 files changed, 0 insertions, 0 deletions