Searched hist:"2 f30b7c377fa9a7dfbaf6eed56a07be7953e509e" (Results 1 – 1 of 1) sorted by relevance
/openbmc/qemu/ |
H A D | block.c | diff 2f30b7c377fa9a7dfbaf6eed56a07be7953e509e Sat Feb 23 13:20:39 CST 2019 Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> block: improve should_update_child
As it already said in the comment, we don't want to create loops in parent->child relations. So, when we try to append @to to @c, we should check that @c is not in @to children subtree, and we should check it recursively, not only the first level. The patch provides BFS-based search, to check the relations.
This is needed for further fleecing-hook filter usage: we need to append it to source, when the hook is already a parent of target, and source may be in a backing chain of target (fleecing-scheme). So, on appending, the hook should not became a child (direct or through children subtree) of the target.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|