[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 11/21] block: Call transaction callbacks with lock held
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 11/21] block: Call transaction callbacks with lock held |
Date: |
Tue, 22 Aug 2023 15:19:02 -0400 |
On Thu, Aug 17, 2023 at 02:50:10PM +0200, Kevin Wolf wrote:
> In previous patches, we changed some transactionable functions to be
> marked as GRAPH_WRLOCK, but required that tran_finalize() is still
> called without the lock. This was because all callbacks that can be in
> the same transaction need to follow the same convention.
>
> Now that we don't have conflicting requirements any more, we can switch
> all of the transaction callbacks to be declared GRAPH_WRLOCK, too, and
> call tran_finalize() with the lock held.
>
> Document for each of these transactionable functions that the lock needs
> to be held when completing the transaction, and make sure that all
> callers down to the place where the transaction is finalised actually
> have the writer lock.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block.c | 61 +++++++++++++++++++++++++++++++++++++++++----------------
> 1 file changed, 44 insertions(+), 17 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH 01/21] block: Remove unused BlockReopenQueueEntry.perms_checked, (continued)
- [PATCH 06/21] block-coroutine-wrapper: Add no_co_wrapper_bdrv_wrlock functions, Kevin Wolf, 2023/08/17
- [PATCH 09/21] block: Mark bdrv_replace_child_tran() GRAPH_WRLOCK, Kevin Wolf, 2023/08/17
- [PATCH 11/21] block: Call transaction callbacks with lock held, Kevin Wolf, 2023/08/17
- Re: [PATCH 11/21] block: Call transaction callbacks with lock held,
Stefan Hajnoczi <=
- [PATCH 03/21] preallocate: Don't poll during permission updates, Kevin Wolf, 2023/08/17
- [PATCH 02/21] preallocate: Factor out preallocate_truncate_to_real_size(), Kevin Wolf, 2023/08/17
- [PATCH 07/21] block-coroutine-wrapper: Allow arbitrary parameter names, Kevin Wolf, 2023/08/17