diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2023-10-27 17:53:20 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2023-11-07 19:14:19 +0100 |
| commit | ec82cc41a79ffa8b1a2dee76a420a34a59f117c6 (patch) | |
| tree | ddf2688b003771da23cd81e3adf6af6699185af7 /include | |
| parent | 79bb76272763c090f2b1dae9519c516257241cac (diff) | |
| download | focaccia-qemu-ec82cc41a79ffa8b1a2dee76a420a34a59f117c6.tar.gz focaccia-qemu-ec82cc41a79ffa8b1a2dee76a420a34a59f117c6.zip | |
block: Mark bdrv_filter_child() and callers GRAPH_RDLOCK
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_filter_child() need to hold a reader lock for the graph because it accesses bs->file/backing. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20231027155333.420094-12-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block_int-io.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h index 4e7bf57a5e..17547a2dab 100644 --- a/include/block/block_int-io.h +++ b/include/block/block_int-io.h @@ -131,8 +131,8 @@ int co_wrapper_mixed_bdrv_rdlock bdrv_refresh_total_sectors(BlockDriverState *bs, int64_t hint); BdrvChild *bdrv_cow_child(BlockDriverState *bs); -BdrvChild *bdrv_filter_child(BlockDriverState *bs); -BdrvChild *bdrv_filter_or_cow_child(BlockDriverState *bs); +BdrvChild * GRAPH_RDLOCK bdrv_filter_child(BlockDriverState *bs); +BdrvChild * GRAPH_RDLOCK bdrv_filter_or_cow_child(BlockDriverState *bs); BdrvChild * GRAPH_RDLOCK bdrv_primary_child(BlockDriverState *bs); BlockDriverState * GRAPH_RDLOCK bdrv_skip_filters(BlockDriverState *bs); BlockDriverState * GRAPH_RDLOCK bdrv_backing_chain_next(BlockDriverState *bs); |