]> git.proxmox.com Git - mirror_qemu.git/blobdiff - block/filter-compress.c
Merge remote-tracking branch 'remotes/kraxel/tags/modules-20200707-pull-request'...
[mirror_qemu.git] / block / filter-compress.c
index 82c315b298f343cf79bbe3d9ea8a69286aafa94c..8ec1991c1f216ef04e4c5eaf6e82b072ddab0f51 100644 (file)
@@ -30,8 +30,9 @@
 static int compress_open(BlockDriverState *bs, QDict *options, int flags,
                          Error **errp)
 {
-    bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file, false,
-                               errp);
+    bs->file = bdrv_open_child(NULL, options, "file", bs, &child_of_bds,
+                               BDRV_CHILD_FILTERED | BDRV_CHILD_PRIMARY,
+                               false, errp);
     if (!bs->file) {
         return -EINVAL;
     }
@@ -132,7 +133,7 @@ static BlockDriver bdrv_compress = {
     .format_name                        = "compress",
 
     .bdrv_open                          = compress_open,
-    .bdrv_child_perm                    = bdrv_filter_default_perms,
+    .bdrv_child_perm                    = bdrv_default_perms,
 
     .bdrv_getlength                     = compress_getlength,