diff options
author | BenoƮt Canet <benoit.canet@irqsave.net> | 2014-03-05 23:48:29 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-03-06 11:33:10 +0100 |
commit | 90ce8a061bdcc485a56142cae68cfbfff270e634 (patch) | |
tree | 684bf0aef889952955a58a8372b3cc41fe3b3e6e /block/mirror.c | |
parent | 47ea2de2d68b6c5319308b7de1980f463b7c125c (diff) |
block: make bdrv_swap rebuild the bs graph node list field.
Moving only the node_name one field could lead to some inconsitencies where a
node_name was defined on a bs which was not registered in the graph node list.
bdrv_swap between a named node bs and a non named node bs would lead to this.
bdrv_make_anon would then crash because it would try to remove the bs from the
graph node list while it is not in it.
This patch remove named node bses from the graph node list before doing the swap
then insert them back.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/mirror.c')
0 files changed, 0 insertions, 0 deletions