diff options
author | Kevin Wolf <kwolf@redhat.com> | 2022-12-07 14:18:35 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2022-12-15 16:08:23 +0100 |
commit | 303de47b2c1e20a7f326ad11976d6006f5498709 (patch) | |
tree | 63365e5b9b75b8440c747a4f7cc5dfca444dc52d /include/block | |
parent | 4002ffdc4fa7a2fd9b5a86772311c646a73775f7 (diff) | |
download | qemu-303de47b2c1e20a7f326ad11976d6006f5498709.zip qemu-303de47b2c1e20a7f326ad11976d6006f5498709.tar.gz qemu-303de47b2c1e20a7f326ad11976d6006f5498709.tar.bz2 |
Mark assert_bdrv_graph_readable/writable() GRAPH_RD/WRLOCK
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221207131838.239125-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.h | 4 | ||||
-rw-r--r-- | include/block/graph-lock.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h index a6bc6b7..b1f0d88 100644 --- a/include/block/block_int-common.h +++ b/include/block/block_int-common.h @@ -898,8 +898,8 @@ struct BdrvChildClass { void (*activate)(BdrvChild *child, Error **errp); int (*inactivate)(BdrvChild *child); - void (*attach)(BdrvChild *child); - void (*detach)(BdrvChild *child); + void GRAPH_WRLOCK_PTR (*attach)(BdrvChild *child); + void GRAPH_WRLOCK_PTR (*detach)(BdrvChild *child); /* * Notifies the parent that the filename of its child has changed (e.g. diff --git a/include/block/graph-lock.h b/include/block/graph-lock.h index 33c05b3..4c92cd8 100644 --- a/include/block/graph-lock.h +++ b/include/block/graph-lock.h @@ -176,14 +176,14 @@ bdrv_graph_rdunlock_main_loop(void); * or there is at least a reader helding the rdlock. * In this way an incoming writer is aware of the read and waits. */ -void assert_bdrv_graph_readable(void); +void GRAPH_RDLOCK assert_bdrv_graph_readable(void); /* * assert_bdrv_graph_writable: * Make sure that the writer is the main loop and has set @has_writer, * so that incoming readers will pause. */ -void assert_bdrv_graph_writable(void); +void GRAPH_WRLOCK assert_bdrv_graph_writable(void); /* * Calling this function tells TSA that we know that the lock is effectively |