]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: block: Introduce helper function to ensure that block nodes are active
authorPeter Krempa <pkrempa@redhat.com>
Wed, 23 Jul 2025 15:30:02 +0000 (17:30 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 Oct 2025 13:32:39 +0000 (15:32 +0200)
commit84ad4964946429b7917f7307e481b39e6a2d7e9e
treece709553f42e2fdd2093232f43a9e9f7edd4ff98
parent648b0ddb13f2adbabee5471c207ac82c4d20a4c6
qemu: block: Introduce helper function to ensure that block nodes are active

Upcoming changes to snapshot code will break the assumption that block
nodes are always active (if the function is able to acquire a modify
job).

Introduce qemuBlockNodesEnsureActive that checks if the block graph in
qemu contains any inactive nodes and if yes reactivates everything.

The function will be used on code paths such as blockjobs which require
the nodes to be active.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h