]> git.proxmox.com Git - mirror_qemu.git/commit - block/commit.c
block: Mark block_job_add_bdrv() GRAPH_WRLOCK
authorKevin Wolf <kwolf@redhat.com>
Fri, 27 Oct 2023 15:53:14 +0000 (17:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Nov 2023 18:14:19 +0000 (19:14 +0100)
commitf3bbc53dc56c5d410f76442da6ad15ec8f9439fc
treecd6a05dfd503b5922695d95c1843e5d71d428401
parent03b9eaca540322dd6dd4810aa57f3196ce971542
block: Mark block_job_add_bdrv() GRAPH_WRLOCK

Instead of taking the writer lock internally, require callers to already
hold it when calling block_job_add_bdrv(). These callers will typically
already hold the graph lock once the locking work is completed, which
means that they can't call functions that take it internally.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231027155333.420094-6-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/backup.c
block/commit.c
block/mirror.c
block/stream.c
blockjob.c
include/block/blockjob.h
include/block/blockjob_int.h
tests/unit/test-bdrv-drain.c