Signed-off-by: Wen Congyang <we...@cn.fujitsu.com> Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com> Signed-off-by: Gonglei <arei.gong...@huawei.com> --- block.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/block.c b/block.c index c7670d2..50f3532 100644 --- a/block.c +++ b/block.c @@ -4396,6 +4396,10 @@ void bdrv_start_replication(BlockDriverState *bs, ReplicationMode mode, { BlockDriver *drv = bs->drv; + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKING_REFERENCE, NULL)) { + return; + } + if (drv && drv->bdrv_start_replication) { drv->bdrv_start_replication(bs, mode, errp); } else if (bs->file) { @@ -4410,6 +4414,10 @@ void bdrv_do_checkpoint(BlockDriverState *bs, Error **errp) { BlockDriver *drv = bs->drv; + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKING_REFERENCE, NULL)) { + return; + } + if (drv && drv->bdrv_do_checkpoint) { drv->bdrv_do_checkpoint(bs, errp); } else if (bs->file) { @@ -4424,6 +4432,10 @@ void bdrv_stop_replication(BlockDriverState *bs, bool failover, Error **errp) { BlockDriver *drv = bs->drv; + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKING_REFERENCE, NULL)) { + return; + } + if (drv && drv->bdrv_stop_replication) { drv->bdrv_stop_replication(bs, failover, errp); } else if (bs->file) { -- 2.4.3