[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/22] qcow2: Mark check_constraints_on_bitmap() GRAPH_RDLOCK
From: |
Kevin Wolf |
Subject: |
[PATCH 16/22] qcow2: Mark check_constraints_on_bitmap() GRAPH_RDLOCK |
Date: |
Fri, 29 Sep 2023 16:51:51 +0200 |
It still has an assume_graph_lock() call, but all of its callers are now
properly annotated to hold the graph lock. Update the function to be
GRAPH_RDLOCK as well and remove the assume_graph_lock().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qcow2-bitmap.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index 80f3ecea62..9c1b5e3d00 100644
--- a/block/qcow2-bitmap.c
+++ b/block/qcow2-bitmap.c
@@ -156,18 +156,15 @@ static int64_t get_bitmap_bytes_needed(int64_t len,
uint32_t granularity)
return DIV_ROUND_UP(num_bits, 8);
}
-static int check_constraints_on_bitmap(BlockDriverState *bs,
- const char *name,
- uint32_t granularity,
- Error **errp)
+static int GRAPH_RDLOCK
+check_constraints_on_bitmap(BlockDriverState *bs, const char *name,
+ uint32_t granularity, Error **errp)
{
BDRVQcow2State *s = bs->opaque;
int granularity_bits = ctz32(granularity);
int64_t len = bdrv_getlength(bs);
int64_t bitmap_bytes;
- assume_graph_lock(); /* FIXME */
-
assert(granularity > 0);
assert((granularity & (granularity - 1)) == 0);
--
2.41.0
- [PATCH 09/22] block: Mark bdrv_get_xdbg_block_graph() and callers GRAPH_RDLOCK, (continued)
- [PATCH 09/22] block: Mark bdrv_get_xdbg_block_graph() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 08/22] block: Take graph rdlock in parts of reopen, Kevin Wolf, 2023/09/29
- [PATCH 10/22] block: Mark bdrv_refresh_filename() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 11/22] block: Mark bdrv_primary_child() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 12/22] block: Mark bdrv_get_parent_name() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 07/22] block: Mark bdrv_snapshot_fallback() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 13/22] block: Mark bdrv_amend_options() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 14/22] qcow2: Mark qcow2_signal_corruption() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 15/22] qcow2: Mark qcow2_inactivate() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 17/22] block: Mark bdrv_op_is_blocked() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 16/22] qcow2: Mark check_constraints_on_bitmap() GRAPH_RDLOCK,
Kevin Wolf <=
- [PATCH 19/22] block: Mark bdrv_get_specific_info() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 18/22] block: Mark bdrv_apply_auto_read_only() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/09/29
- [PATCH 21/22] block: Protect bs->children with graph_lock, Kevin Wolf, 2023/09/29
- [PATCH 20/22] block: Protect bs->parents with graph_lock, Kevin Wolf, 2023/09/29
- [PATCH 22/22] block: Add assertion for bdrv_graph_wrlock(), Kevin Wolf, 2023/09/29