[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/21] block: Mark bdrv_get_cumulative_perm() and callers GRA
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH 14/21] block: Mark bdrv_get_cumulative_perm() and callers GRAPH_RDLOCK |
Date: |
Tue, 22 Aug 2023 15:28:33 -0400 |
On Thu, Aug 17, 2023 at 02:50:13PM +0200, Kevin Wolf wrote:
> The function reads the parents list, so it needs to hold the graph lock.
>
> This happens to result in BlockDriver.bdrv_set_perm() to be called with
> the graph lock held. For consistency, make it the same for all of the
> BlockDriver callbacks for updating permissions and annotate the function
> pointers with GRAPH_RDLOCK_PTR.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> include/block/block_int-common.h | 9 ++++---
> include/block/block_int-global-state.h | 4 +--
> block.c | 35 ++++++++++++++++++++------
> blockdev.c | 6 +++++
> 4 files changed, 40 insertions(+), 14 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- Re: [PATCH 21/21] block: Mark bdrv_add/del_child() and caller GRAPH_WRLOCK, (continued)