[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] block-backend: Allow concurrent context changes
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 1/2] block-backend: Allow concurrent context changes |
Date: |
Tue, 6 Feb 2024 11:55:06 -0500 |
On Fri, Feb 02, 2024 at 03:47:54PM +0100, Hanna Czenczek wrote:
> 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>
> ---
> block/block-backend.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- [PATCH 0/2] block: Allow concurrent BB context changes, Hanna Czenczek, 2024/02/02
- [PATCH 2/2] scsi: Await request purging, Hanna Czenczek, 2024/02/02
- [PATCH 1/2] block-backend: Allow concurrent context changes, Hanna Czenczek, 2024/02/02
- Re: [PATCH 1/2] block-backend: Allow concurrent context changes,
Stefan Hajnoczi <=
- Re: [PATCH 0/2] block: Allow concurrent BB context changes, Stefan Hajnoczi, 2024/02/06
- Re: [PATCH 0/2] block: Allow concurrent BB context changes, Kevin Wolf, 2024/02/07
- Re: [PATCH 0/2] block: Allow concurrent BB context changes, Michael Tokarev, 2024/02/09