]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
commit: Support multiple roots above top node
authorKevin Wolf <kwolf@redhat.com>
Tue, 19 Sep 2017 14:22:54 +0000 (16:22 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 6 Oct 2017 14:28:58 +0000 (16:28 +0200)
commit61f09cea01391eaa23ea3bc78ab37a7d2da565fb
treefebcbb8facee779caf76e9a5c6b394b922f5f1c1
parent6858eba09ed69e64c8d05d4f4b8167b42a011b7f
commit: Support multiple roots above top node

This changes the commit block job to support operation in a graph where
there is more than a single active layer that references the top node.

This involves inserting the commit filter node not only on the path
between the given active node and the top node, but between the top node
and all of its parents.

On completion, bdrv_drop_intermediate() must consider all parents for
updating the backing file link. These parents may be backing files
themselves and as such read-only; reopen them temporarily if necessary.
Previously this was achieved by the bdrv_reopen() calls in the commit
block job that made overlay_bs read-write for the whole duration of the
block job, even though write access is only needed on completion.

Now that we consider all parents, overlay_bs is meaningless. It is left
in place in this commit, but we'll remove it soon.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/commit.c