diff options
author | Kevin Wolf <kwolf@redhat.com> | 2015-04-08 13:43:47 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-06-12 17:04:59 +0200 |
commit | f3930ed0bb1945b59da8e591072b5c79606d0760 (patch) | |
tree | bbc19fff220e6e2291622b755259549adf733a17 /block/vmdk.c | |
parent | 18edf289a8951f3a48caff3b5fe17f2d414c2924 (diff) | |
download | qemu-f3930ed0bb1945b59da8e591072b5c79606d0760.zip qemu-f3930ed0bb1945b59da8e591072b5c79606d0760.tar.gz qemu-f3930ed0bb1945b59da8e591072b5c79606d0760.tar.bz2 |
block: Move flag inheritance to bdrv_open_inherit()
Instead of letting every caller of bdrv_open() determine the right flags
for its child node manually and pass them to the function, pass the
parent node and the role of the newly opened child (like backing file,
protocol layer, etc.).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/vmdk.c')
-rw-r--r-- | block/vmdk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index aad051b..3284bec 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -852,9 +852,8 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs, ret = snprintf(extent_opt_prefix, 32, "extents.%d", s->num_extents); assert(ret < 32); - ret = bdrv_open_image(&extent_file, extent_path, - options, extent_opt_prefix, - bs->open_flags | BDRV_O_PROTOCOL, false, errp); + ret = bdrv_open_image(&extent_file, extent_path, options, + extent_opt_prefix, bs, &child_file, false, errp); g_free(extent_path); if (ret) { return ret; |