qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] Update the inherits_from pointer after stream and commit
@ 2018-10-31 16:16 Alberto Garcia
  2018-10-31 16:16 ` [Qemu-devel] [PATCH 1/2] block: Update BlockDriverState.inherits_from on bdrv_set_backing_hd() Alberto Garcia
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alberto Garcia @ 2018-10-31 16:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alberto Garcia, qemu-block, Kevin Wolf, Max Reitz

Hi all,

when you open an image [A] with a few more images on the backing chain
you get something like this:

    [E] <- [D] <- [C] <- [B] <- [A]

Here you can go from [A] to [E] by following the bs->backing
pointer. At the same time each one of the backing files has an
'inherits_from' attribute pointing to their parent, so you can go from
[E] to [A] following the inherits_from pointer.

'inherits_from' is used on bdrv_reopen_queue_child() to decide if a
node's children must be reopened together with the parent and inherit
its options.

If some the intermediate nodes are removed (either by block-stream or
by block-commit) you end up with something like this:

   [E] <- [A]

In this case we would expect [E] to inherit from [A], however its
inherits_from pointer is NULL and trying to change its options by
reopening [A] with backing.option=value fails.

This patch series fixes this. See each individual patch for more
details.

Regards,

Berto

Alberto Garcia (2):
  block: Update BlockDriverState.inherits_from on bdrv_set_backing_hd()
  block: Update BlockDriverState.inherits_from on
    bdrv_drop_intermediate()

 block.c                    |  37 ++++++++++++
 tests/qemu-iotests/161     | 137 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/161.out |  39 +++++++++++++
 tests/qemu-iotests/group   |   1 +
 4 files changed, 214 insertions(+)
 create mode 100755 tests/qemu-iotests/161
 create mode 100644 tests/qemu-iotests/161.out

-- 
2.11.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-22 20:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-31 16:16 [Qemu-devel] [PATCH 0/2] Update the inherits_from pointer after stream and commit Alberto Garcia
2018-10-31 16:16 ` [Qemu-devel] [PATCH 1/2] block: Update BlockDriverState.inherits_from on bdrv_set_backing_hd() Alberto Garcia
2018-10-31 16:16 ` [Qemu-devel] [PATCH 2/2] block: Update BlockDriverState.inherits_from on bdrv_drop_intermediate() Alberto Garcia
2018-11-22 16:27 ` [Qemu-devel] [PATCH 0/2] Update the inherits_from pointer after stream and commit Alberto Garcia
2018-11-22 17:52 ` Kevin Wolf
2018-11-22 20:06   ` Alberto Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).