]> xenbits.xensource.com Git - qemu-xen.git/commit
block: add bdrv_replace_node_common()
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 6 Nov 2020 12:42:36 +0000 (15:42 +0300)
committerMax Reitz <mreitz@redhat.com>
Mon, 9 Nov 2020 17:43:31 +0000 (18:43 +0100)
commit313274bbd4677f44631921ef4366f4ffc81cc5d5
tree0ee4561d1f1196e440784f4c699df56ad8ab2c52
parent6c5f7b3a1002ebe552782de4f3664a486d444323
block: add bdrv_replace_node_common()

Add new parameter to bdrv_replace_node(): auto_skip. With
auto_skip=false we'll have stricter behavior: update _all_ from
parents or fail. New behaviour will be used in the following commit in
block.c, so keep original function name as public interface.

Note: new error message is a bit funny in contrast with further
"Cannot" in case of frozen child, but we'd better keep some difference
to make it possible to distinguish one from another on failure. Still,
actually we'd better refactor should_update_child() call to distinguish
also different kinds of "should not". Let's do it later.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20201106124241.16950-3-vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block.c