diff options
author | Alberto Garcia <berto@igalia.com> | 2016-08-21 23:36:03 -0400 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-09-20 22:12:57 +0200 |
commit | 4d6f8cbba75eb3bf389cd0edb779c9e33f4b03a6 (patch) | |
tree | e7f0af2ac0f4c8c1066cd32b221cc9758897c620 /tests | |
parent | 4be4879ff8b4a6504ed981c470f3cb6b57eddb1d (diff) |
commit: get the overlay node before manipulating the backing chain
The 'block-commit' command has a 'top' parameter to specify the
topmost node from which the data is going to be copied.
[E] <- [D] <- [C] <- [B] <- [A]
In this case if [C] is the top node then this is the result:
[E] <- [B] <- [A]
[B] must be modified so its backing image string points to [E] instead
of [C]. commit_start() takes care of reopening [B] in read-write
mode, and commit_complete() puts it back in read-only mode once the
operation has finished.
In order to find [B] (the overlay node) we look for the node that has
[C] (the top node) as its backing image. However in commit_complete()
we're doing it after [C] has been removed from the chain, so [B] is
never found and remains in read-write mode.
This patch gets the overlay node before the backing chain is
manipulated.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 1471836963-28548-1-git-send-email-berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions