[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/28] mirror: Require GRAPH_RDLOCK for accessing a node's parent
From: |
Kevin Wolf |
Subject: |
[PULL 19/28] mirror: Require GRAPH_RDLOCK for accessing a node's parent list |
Date: |
Wed, 10 May 2023 14:21:02 +0200 |
This adds GRAPH_RDLOCK annotations to declare that functions accessing
the parent list of a node need to hold a reader lock for the graph. As
it happens, they already do.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230504115750.54437-13-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/mirror.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/mirror.c b/block/mirror.c
index 80fa345071..b5c4ae31f3 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1416,7 +1416,7 @@ static MirrorOp *coroutine_fn
active_write_prepare(MirrorBlockJob *s,
return op;
}
-static void coroutine_fn active_write_settle(MirrorOp *op)
+static void coroutine_fn GRAPH_RDLOCK active_write_settle(MirrorOp *op)
{
uint64_t start_chunk = op->offset / op->s->granularity;
uint64_t end_chunk = DIV_ROUND_UP(op->offset + op->bytes,
--
2.40.1
- [PULL 11/28] iotests: Test resizing image attached to an iothread, (continued)
- [PULL 11/28] iotests: Test resizing image attached to an iothread, Kevin Wolf, 2023/05/10
- [PULL 14/28] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock, Kevin Wolf, 2023/05/10
- [PULL 13/28] graph-lock: Add GRAPH_UNLOCKED(_PTR), Kevin Wolf, 2023/05/10
- [PULL 16/28] nbd: Remove nbd_co_flush() wrapper function, Kevin Wolf, 2023/05/10
- [PULL 20/28] block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 09/28] block: bdrv/blk_co_unref() for calls in coroutine context, Kevin Wolf, 2023/05/10
- [PULL 18/28] vhdx: Require GRAPH_RDLOCK for accessing a node's parent list, Kevin Wolf, 2023/05/10
- [PULL 19/28] mirror: Require GRAPH_RDLOCK for accessing a node's parent list,
Kevin Wolf <=
- [PULL 23/28] block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 22/28] block: Mark bdrv_co_debug_event() GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 17/28] nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 26/28] block: Mark bdrv_recurse_can_replace() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 25/28] block: Mark bdrv_query_block_graph_info() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 27/28] block: Mark bdrv_refresh_limits() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 24/28] block: Mark bdrv_query_bds_stats() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 21/28] block: Mark bdrv_co_get_info() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 28/28] block: compile out assert_bdrv_graph_readable() by default, Kevin Wolf, 2023/05/10
- Re: [PULL 00/28] Block layer patches, Richard Henderson, 2023/05/10