block: reopen: Document option precedence and refactor accordingly
commit2851810223a6f2a3f6c00613477feb6e33c10d34
authorKevin Wolf <kwolf@redhat.com>
Fri, 8 May 2015 15:07:31 +0000 (8 17:07 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 18 Dec 2015 13:34:42 +0000 (18 14:34 +0100)
tree1718134c233a55aaee4e0e549ce1c7ace3583103
parent4c9dfe5d8a7eb956513593720b8d1a9ca2c5a7f9
block: reopen: Document option precedence and refactor accordingly

The interesting part of reopening an image is from which sources the
effective options should be taken, i.e. which options take precedence
over which other options. This patch documents the precedence that will
be implemented in the following patches.

It also refactors bdrv_reopen_queue(), so that the top-level reopened
node is handled the same way as children are. Option/flag inheritance
from the parent becomes just one item in the list and is done at the
beginning of the function, similar to how the other items are/will be
handled.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c