aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2023-02-03 16:21:54 +0100
committerKevin Wolf <kwolf@redhat.com>2023-02-23 19:49:21 +0100
commit7b9e8b22bca534e0e86915c0856d77a7ae99e160 (patch)
treefe8136f04c3c07ac48b1e586c3e0946c0ebcf6fe /include/block
parent742bf09b2004a78708f64327d61471fe011ff799 (diff)
block: Mark preadv_snapshot/snapshot_block_status GRAPH_RDLOCK
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20230203152202.49054-16-kwolf@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int-common.h12
-rw-r--r--include/block/block_int-io.h8
2 files changed, 11 insertions, 9 deletions
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index 29b230cc0b..7d8309ba5a 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -624,11 +624,13 @@ struct BlockDriver {
* - receive the snapshot's actual length (which may differ from bs's
* length)
*/
- int coroutine_fn (*bdrv_co_preadv_snapshot)(BlockDriverState *bs,
- int64_t offset, int64_t bytes, QEMUIOVector *qiov, size_t qiov_offset);
- int coroutine_fn (*bdrv_co_snapshot_block_status)(BlockDriverState *bs,
- bool want_zero, int64_t offset, int64_t bytes, int64_t *pnum,
- int64_t *map, BlockDriverState **file);
+ int coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_preadv_snapshot)(
+ BlockDriverState *bs, int64_t offset, int64_t bytes,
+ QEMUIOVector *qiov, size_t qiov_offset);
+
+ int coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_snapshot_block_status)(
+ BlockDriverState *bs, bool want_zero, int64_t offset, int64_t bytes,
+ int64_t *pnum, int64_t *map, BlockDriverState **file);
int coroutine_fn GRAPH_RDLOCK_PTR (*bdrv_co_pdiscard_snapshot)(
BlockDriverState *bs, int64_t offset, int64_t bytes);
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index 5788bd66ba..612e5ddf99 100644
--- a/include/block/block_int-io.h
+++ b/include/block/block_int-io.h
@@ -35,11 +35,11 @@
* the I/O API.
*/
-int coroutine_fn bdrv_co_preadv_snapshot(BdrvChild *child,
+int coroutine_fn GRAPH_RDLOCK bdrv_co_preadv_snapshot(BdrvChild *child,
int64_t offset, int64_t bytes, QEMUIOVector *qiov, size_t qiov_offset);
-int coroutine_fn bdrv_co_snapshot_block_status(BlockDriverState *bs,
- bool want_zero, int64_t offset, int64_t bytes, int64_t *pnum,
- int64_t *map, BlockDriverState **file);
+int coroutine_fn GRAPH_RDLOCK bdrv_co_snapshot_block_status(
+ BlockDriverState *bs, bool want_zero, int64_t offset, int64_t bytes,
+ int64_t *pnum, int64_t *map, BlockDriverState **file);
int coroutine_fn GRAPH_RDLOCK bdrv_co_pdiscard_snapshot(BlockDriverState *bs,
int64_t offset, int64_t bytes);