aboutsummaryrefslogtreecommitdiff
path: root/block/blkreplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blkreplay.c')
-rw-r--r--block/blkreplay.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blkreplay.c b/block/blkreplay.c
index c96ac8f4bc..30a0f5d57a 100644
--- a/block/blkreplay.c
+++ b/block/blkreplay.c
@@ -27,8 +27,9 @@ static int blkreplay_open(BlockDriverState *bs, QDict *options, int flags,
int ret;
/* Open the image file */
- bs->file = bdrv_open_child(NULL, options, "image",
- bs, &child_file, false, &local_err);
+ bs->file = bdrv_open_child(NULL, options, "image", bs, &child_of_bds,
+ BDRV_CHILD_FILTERED | BDRV_CHILD_PRIMARY,
+ false, &local_err);
if (local_err) {
ret = -EINVAL;
error_propagate(errp, local_err);
@@ -135,9 +136,10 @@ static int blkreplay_snapshot_goto(BlockDriverState *bs,
static BlockDriver bdrv_blkreplay = {
.format_name = "blkreplay",
.instance_size = 0,
+ .is_filter = true,
.bdrv_open = blkreplay_open,
- .bdrv_child_perm = bdrv_filter_default_perms,
+ .bdrv_child_perm = bdrv_default_perms,
.bdrv_getlength = blkreplay_getlength,
.bdrv_co_preadv = blkreplay_co_preadv,