Am 19.01.2024 um 17:29 hat Ari Sundholm geschrieben:
> During the review of a fix for a concurrency issue in blklogwrites,
> it was found that the driver needs an additional fix when enabling
> multiqueue, which is a new feature introduced in QEMU 9.0, as the
> driver state may be read and written by multiple threads at the same
> time, which was not the case when the driver was originally written.
> 
> Fix the multi-threaded scenario by introducing a mutex to protect the
> mutable fields in the driver state, and always having the mutex locked
> by the current thread when accessing them. Also use the mutex and a
> CoQueue to ensure that the super block is not being written to by
> multiple threads concurrently and updates are properly serialized.
> 
> Additionally, add the const qualifier to a few BDRVBlkLogWritesState
> pointer targets in contexts where the driver state is not written to.
> 
> Signed-off-by: Ari Sundholm <a...@tuxera.com>
> 
> v1->v2: Ensure that the super block is not written to concurrently.
> v2->v3: Use a CoQueue instead of a condition variable, as the latter
> does not make the currently executing coroutine yield on entering a
> wait.
> ---
>  block/blklogwrites.c | 85 +++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 77 insertions(+), 8 deletions(-)

For your next series, please put the changelog between versions below
the "---" marker so that git am doesn't consider it part of the commit
message.

Thanks, applied to the block branch.

Kevin


Reply via email to