Message ID | 1449034311-4094-3-git-send-email-wency@cn.fujitsu.com |
---|---|
State | New |
Headers | show |
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;