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/blkdebug.c | |
| parent | e2dd273754eb9a47c33660b4e14074e8e96ada4d (diff) | |
| download | focaccia-qemu-79a558664840adf502fe94907b0a680836e3e98e.tar.gz focaccia-qemu-79a558664840adf502fe94907b0a680836e3e98e.zip | |
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/blkdebug.c')
| -rw-r--r-- | block/blkdebug.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c index addad914b3..230efa9e8d 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -746,13 +746,10 @@ blkdebug_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) return bdrv_co_pdiscard(bs->file, offset, bytes); } -static int coroutine_fn blkdebug_co_block_status(BlockDriverState *bs, - bool want_zero, - int64_t offset, - int64_t bytes, - int64_t *pnum, - int64_t *map, - BlockDriverState **file) +static int coroutine_fn GRAPH_RDLOCK +blkdebug_co_block_status(BlockDriverState *bs, bool want_zero, int64_t offset, + int64_t bytes, int64_t *pnum, int64_t *map, + BlockDriverState **file) { int err; @@ -973,7 +970,7 @@ blkdebug_co_getlength(BlockDriverState *bs) return bdrv_co_getlength(bs->file->bs); } -static void blkdebug_refresh_filename(BlockDriverState *bs) +static void GRAPH_RDLOCK blkdebug_refresh_filename(BlockDriverState *bs) { BDRVBlkdebugState *s = bs->opaque; const QDictEntry *e; |