mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
234ac1a902
commit
5fe31c25cc
5 changed files with 20 additions and 30 deletions
|
@ -441,8 +441,8 @@ typedef struct BdrvAioNotifier {
|
|||
} BdrvAioNotifier;
|
||||
|
||||
struct BdrvChildRole {
|
||||
/* If true, bdrv_replace_in_backing_chain() doesn't change the node this
|
||||
* BdrvChild points to. */
|
||||
/* If true, bdrv_replace_node() doesn't change the node this BdrvChild
|
||||
* points to. */
|
||||
bool stay_at_node;
|
||||
|
||||
void (*inherit_options)(int *child_flags, QDict *child_options,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue