[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [Patch v12 resend 02/10] Store parent BDS in BdrvChild
From: |
Wen Congyang |
Subject: |
[Qemu-block] [Patch v12 resend 02/10] Store parent BDS in BdrvChild |
Date: |
Wed, 2 Dec 2015 13:31:43 +0800 |
We need to access the parent BDS to get the root BDS.
Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
block.c | 1 +
include/block/block_int.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/block.c b/block.c
index eaf479a..0a0468f 100644
--- a/block.c
+++ b/block.c
@@ -1204,6 +1204,7 @@ BdrvChild *bdrv_attach_child(BlockDriverState *parent_bs,
BdrvChild *child = g_new(BdrvChild, 1);
*child = (BdrvChild) {
.bs = child_bs,
+ .parent = parent_bs,
.name = g_strdup(child_name),
.role = child_role,
};
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ea20d12..1f56046 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -357,6 +357,7 @@ extern const BdrvChildRole child_format;
struct BdrvChild {
BlockDriverState *bs;
+ BlockDriverState *parent;
char *name;
const BdrvChildRole *role;
QLIST_ENTRY(BdrvChild) next;
--
2.5.0
- [Qemu-block] [Patch v12 resend 00/10] Block replication for continuous checkpoints, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 02/10] Store parent BDS in BdrvChild,
Wen Congyang <=
- [Qemu-block] [Patch v12 resend 01/10] unblock backup operations in backing file, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 03/10] Backup: clear all bitmap when doing block checkpoint, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 04/10] Allow creating backup jobs when opening BDS, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 05/10] docs: block replication's description, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 06/10] Add new block driver interfaces to control block replication, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 07/10] quorum: implement block driver interfaces for block replication, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 08/10] Implement new driver for block replication, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 09/10] support replication driver in blockdev-add, Wen Congyang, 2015/12/02
- [Qemu-block] [Patch v12 resend 10/10] Add a new API to start/stop replication, do checkpoint to all BDSes, Wen Congyang, 2015/12/02
- Re: [Qemu-block] [Patch v12 resend 00/10] Block replication for continuous checkpoints, Wen Congyang, 2015/12/17