diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2023-05-04 13:57:42 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2023-05-10 14:16:53 +0200 |
| commit | 9c93652da6784314519968c65c05fcaccfe56193 (patch) | |
| tree | 72f1a58fede500558801dcbd46077abf59eb236b | |
| parent | 622d30af9930e9eb791cf6344633c256e328a7ef (diff) | |
| download | focaccia-qemu-9c93652da6784314519968c65c05fcaccfe56193.tar.gz focaccia-qemu-9c93652da6784314519968c65c05fcaccfe56193.zip | |
mirror: Require GRAPH_RDLOCK for accessing a node's parent list
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>
| -rw-r--r-- | block/mirror.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |