[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH COLO-Block v6 12/16] skip nbd_target when starting b
From: |
Wen Congyang |
Subject: |
[Qemu-block] [PATCH COLO-Block v6 12/16] skip nbd_target when starting block replication |
Date: |
Thu, 18 Jun 2015 16:49:17 +0800 |
Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
block.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/block.c b/block.c
index 06222bf..2108d02 100644
--- a/block.c
+++ b/block.c
@@ -4430,6 +4430,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) {
@@ -4443,6 +4447,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) {
@@ -4456,6 +4464,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
- Re: [Qemu-block] [Qemu-devel] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target, (continued)
- [Qemu-block] [PATCH COLO-Block v6 04/16] block: Parse "backing_reference" option to reference existing BDS, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 09/16] Introduce a new -drive option to control whether to connect to remote target, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 10/16] NBD client: connect to nbd server later, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 08/16] NBD client: implement block driver interfaces to connect/disconnect NBD server, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 13/16] quorum: implement block driver interfaces for block replication, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 11/16] Add new block driver interfaces to control block replication, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 12/16] skip nbd_target when starting block replication,
Wen Congyang <=
- [Qemu-block] [PATCH COLO-Block v6 14/16] introduce a new API qemu_opts_absorb_qdict_by_index(), Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 15/16] quorum: allow ignoring child errors, Wen Congyang, 2015/06/18
- [Qemu-block] [PATCH COLO-Block v6 16/16] Implement new driver for block replication, Wen Congyang, 2015/06/18