diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-09-29 16:51:51 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-10-12 16:31:33 +0200 |
commit | 5155853e90388d9c8c5370bcbe1b6484a92ee710 (patch) | |
tree | ac89d99444cb078d854b766546ba8d19d444a68b /block | |
parent | de4fed6f4ef7f2f1a1bce50a2cbbb7fdd397b7ec (diff) | |
download | qemu-5155853e90388d9c8c5370bcbe1b6484a92ee710.zip qemu-5155853e90388d9c8c5370bcbe1b6484a92ee710.tar.gz qemu-5155853e90388d9c8c5370bcbe1b6484a92ee710.tar.bz2 |
qcow2: Mark check_constraints_on_bitmap() GRAPH_RDLOCK
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>
Message-ID: <20230929145157.45443-17-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2-bitmap.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 6996eab..3058309 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); |