summaryrefslogtreecommitdiff
path: root/block/quorum.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-04-08 13:43:47 +0200
committerKevin Wolf <kwolf@redhat.com>2015-06-12 17:04:59 +0200
commitf3930ed0bb1945b59da8e591072b5c79606d0760 (patch)
treebbc19fff220e6e2291622b755259549adf733a17 /block/quorum.c
parent18edf289a8951f3a48caff3b5fe17f2d414c2924 (diff)
downloadqemu-f3930ed0bb1945b59da8e591072b5c79606d0760.tar.gz
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/quorum.c')
-rw-r--r--block/quorum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/quorum.c b/block/quorum.c
index a33881a387..77e55b2775 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -935,8 +935,8 @@ static int quorum_open(BlockDriverState *bs, QDict *options, int flags,
ret = snprintf(indexstr, 32, "children.%d", i);
assert(ret < 32);
- ret = bdrv_open_image(&s->bs[i], NULL, options, indexstr, flags,
- false, &local_err);
+ ret = bdrv_open_image(&s->bs[i], NULL, options, indexstr, bs,
+ &child_format, false, &local_err);
if (ret < 0) {
goto close_exit;
}