block: Fix error handling in bdrv_replace_in_backing_chain()
commit5fe31c25cce3b09e989e40439667cd4961aba969
authorKevin Wolf <kwolf@redhat.com>
Mon, 6 Mar 2017 15:20:51 +0000 (6 16:20 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 7 Mar 2017 13:53:28 +0000 (7 14:53 +0100)
tree0b9809f4e3af0d80e817a65d0723f305dfe187ae
parent234ac1a9025bcfcc532449f72a97b3d4754d466c
block: Fix error handling in bdrv_replace_in_backing_chain()

When adding an Error parameter, bdrv_replace_in_backing_chain() would
become nothing more than a wrapper around change_parent_backing_link().
So make the latter public, renamed as bdrv_replace_node(), and remove
bdrv_replace_in_backing_chain().

Most of the callers just remove a node from the graph that they just
inserted, so they can use &error_abort, but completion of a mirror job
with 'replaces' set can actually fail.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block.c
block/mirror.c
blockdev.c
include/block/block.h
include/block/block_int.h