On Mon, Jun 16, 2014 at 12:00:56PM +0200, BenoƮt Canet wrote:
> +BlockDriverState *check_to_replace_node(const char *node_name, Error **errp)
> +{
> +    BlockDriverState *to_replace_bs = bdrv_find_node(node_name);
> +    if (!to_replace_bs) {
> +        error_setg(errp, "Node name '%s' not found",
> +                   node_name);
> +        return NULL;
> +    }
> +
> +    if (bdrv_op_is_blocked(to_replace_bs, BLOCK_OP_TYPE_REPLACE, errp)) {
> +        return NULL;
> +    }

Currently bdrv_op_is_blocked(to_replace_bs, BLOCK_OP_TYPE_REPLACE, errp)
is not effective since child nodes never have op blockers.  Only the
root node/drive has op blockers.

We discussed propagating blockers to child nodes.  Can you send a patch
to address this?  I think Jeff will need to rebase his node-name series
too.

Stefan

Attachment: pgpUySzFlQZzy.pgp
Description: PGP signature

Reply via email to