diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-10-27 17:53:29 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-11-08 17:56:17 +0100 |
commit | 79a558664840adf502fe94907b0a680836e3e98e (patch) | |
tree | d47786d89a62f71189b33ccca0164a156b731085 /block/qed.c | |
parent | e2dd273754eb9a47c33660b4e14074e8e96ada4d (diff) | |
download | qemu-79a558664840adf502fe94907b0a680836e3e98e.zip qemu-79a558664840adf502fe94907b0a680836e3e98e.tar.gz qemu-79a558664840adf502fe94907b0a680836e3e98e.tar.bz2 |
block: Add missing GRAPH_RDLOCK annotations
This adds GRAPH_RDLOCK to some driver callbacks that are already called
with the graph lock held, and which will need the annotation because
they access bs->file, but don't have it yet.
This also covers a few callbacks that were not marked GRAPH_RDLOCK
before, but where updating BlockDriver is trivially possible.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-21-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qed.c')
-rw-r--r-- | block/qed.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/block/qed.c b/block/qed.c index 996aa38..f4c1628 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1443,12 +1443,10 @@ bdrv_qed_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, QED_AIOCB_WRITE | QED_AIOCB_ZERO); } -static int coroutine_fn bdrv_qed_co_truncate(BlockDriverState *bs, - int64_t offset, - bool exact, - PreallocMode prealloc, - BdrvRequestFlags flags, - Error **errp) +static int coroutine_fn GRAPH_RDLOCK +bdrv_qed_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, + PreallocMode prealloc, BdrvRequestFlags flags, + Error **errp) { BDRVQEDState *s = bs->opaque; uint64_t old_image_size; |