[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/17] block: unblock backup operations in backing fi
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 05/17] block: unblock backup operations in backing file |
Date: |
Mon, 12 Sep 2016 15:08:42 +0100 |
From: Wen Congyang <address@hidden>
Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: Changlong Xie <address@hidden>
Signed-off-by: Wang WeiWei <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Kashyap Chamarthy <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/block.c b/block.c
index 101f8c6..66ed1c0 100644
--- a/block.c
+++ b/block.c
@@ -1312,6 +1312,23 @@ void bdrv_set_backing_hd(BlockDriverState *bs,
BlockDriverState *backing_hd)
/* Otherwise we won't be able to commit due to check in bdrv_commit */
bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_COMMIT_TARGET,
bs->backing_blocker);
+ /*
+ * We do backup in 3 ways:
+ * 1. drive backup
+ * The target bs is new opened, and the source is top BDS
+ * 2. blockdev backup
+ * Both the source and the target are top BDSes.
+ * 3. internal backup(used for block replication)
+ * Both the source and the target are backing file
+ *
+ * In case 1 and 2, neither the source nor the target is the backing file.
+ * In case 3, we will block the top BDS, so there is only one block job
+ * for the top BDS and its backing chain.
+ */
+ bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_BACKUP_SOURCE,
+ bs->backing_blocker);
+ bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_BACKUP_TARGET,
+ bs->backing_blocker);
out:
bdrv_refresh_limits(bs, NULL);
}
--
2.7.4
- [Qemu-devel] [PULL 00/17] Block patches, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 01/17] linux-aio: consume events in userspace instead of calling io_getevents, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 02/17] linux-aio: split processing events function, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 04/17] virtio-blk: rename virtio_device_info to virtio_blk_info, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 03/17] linux-aio: process completions from ioq_submit(), Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 05/17] block: unblock backup operations in backing file,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 06/17] Backup: clear all bitmap when doing block checkpoint, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 07/17] Backup: export interfaces for extra serialization, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 09/17] docs: block replication's description, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 08/17] block: Link backup into block core, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 10/17] mirror: auto complete active commit, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 11/17] configure: support replication, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 12/17] replication: Introduce new APIs to do replication operation, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 14/17] tests: add unit test case for replication, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 13/17] replication: Implement new driver for block replication, Stefan Hajnoczi, 2016/09/12
- [Qemu-devel] [PULL 15/17] support replication driver in blockdev-add, Stefan Hajnoczi, 2016/09/12