]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/snapshot: move drain outside of read-locked bdrv_snapshot_delete()
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 30 May 2025 15:10:40 +0000 (17:10 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 4 Jun 2025 16:16:33 +0000 (18:16 +0200)
commitd4c5f8c980f1073356d2f18d51dc68d42bebb59d
treef2bd74efe6a9b8b2aa21a2e92789673ffe0ef104
parente1d681b3e1d8256047dbfc6d2c796028b9694eaf
block/snapshot: move drain outside of read-locked bdrv_snapshot_delete()

This is in preparation to mark bdrv_drained_begin() as GRAPH_UNLOCKED.

More granular draining is not trivially possible, because
bdrv_snapshot_delete() can recursively call itself.

The return value of bdrv_all_delete_snapshot() changes from -1 to
-errno propagated from failed sub-calls. This is fine for the existing
callers of bdrv_all_delete_snapshot().

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20250530151125.955508-4-f.ebner@proxmox.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/snapshot.c
blockdev.c
qemu-img.c