diff options
author | Emanuele Giuseppe Esposito <eesposit@redhat.com> | 2023-02-03 16:21:53 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-02-23 19:49:20 +0100 |
commit | 742bf09b2004a78708f64327d61471fe011ff799 (patch) | |
tree | 46fd44f8da6d2e5151e3cf8d158909a4c33f4de1 /block/block-backend.c | |
parent | eeb4777544e41106c85146a96e16da14ab13110f (diff) |
block: Mark bdrv_co_copy_range() GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of
bdrv_co_copy_range() need to hold a reader lock for the graph.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230203152202.49054-15-kwolf@redhat.com>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/block-backend.c')
-rw-r--r-- | block/block-backend.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index 146ef91547..fdb1e1d5f7 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -2644,6 +2644,8 @@ int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in, if (r) { return r; } + + GRAPH_RDLOCK_GUARD(); return bdrv_co_copy_range(blk_in->root, off_in, blk_out->root, off_out, bytes, read_flags, write_flags); |