summary refs log tree commit diff stats
path: root/block/commit.c
diff options
context:
space:
mode:
authorFiona Ebner <f.ebner@proxmox.com>2025-05-30 17:10:48 +0200
committerKevin Wolf <kwolf@redhat.com>2025-06-04 18:16:34 +0200
commite66dbda11eab2b4a091d470f3508a4d6ca60eaf5 (patch)
tree83c598411fed614b97afdb7dfa27caee49b84f6d /block/commit.c
parent2b833595aa21679145cfe67ba720113b165c19ef (diff)
downloadfocaccia-qemu-e66dbda11eab2b4a091d470f3508a4d6ca60eaf5.tar.gz
focaccia-qemu-e66dbda11eab2b4a091d470f3508a4d6ca60eaf5.zip
block: move drain outside of bdrv_set_backing_hd_drained()
This is part of resolving the deadlock mentioned in commit "block:
move draining out of bdrv_change_aio_context() and mark GRAPH_RDLOCK".

The function bdrv_set_backing_hd_drained() holds the graph lock, so it
is not allowed to drain. It is called by:
1. bdrv_set_backing_hd(), where a drained section is introduced,
   replacing the previously present bs-specific drains.
2. stream_prepare(), where a drained section is introduced replacing
   the previously present bs-specific drains.

The drain_bs variable in bdrv_set_backing_hd_drained() is now
superfluous and thus dropped.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20250530151125.955508-12-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/commit.c')
0 files changed, 0 insertions, 0 deletions