[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/51] block: Switch child_format users to child_of_bds
From: |
Kevin Wolf |
Subject: |
[PULL 33/51] block: Switch child_format users to child_of_bds |
Date: |
Fri, 15 May 2020 14:45:03 +0200 |
From: Max Reitz <address@hidden>
Both users (quorum and blkverify) use child_format for
not-really-filtered children, so the appropriate BdrvChildRole in both
cases is DATA. (Note that this will cause bdrv_inherited_options() to
force-allow format probing.)
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/blkverify.c | 4 ++--
block/quorum.c | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index ba4f6d7b7c..1684b7aa2e 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -134,8 +134,8 @@ static int blkverify_open(BlockDriverState *bs, QDict
*options, int flags,
/* Open the test file */
s->test_file = bdrv_open_child(qemu_opt_get(opts, "x-image"), options,
- "test", bs, &child_format, 0, false,
- &local_err);
+ "test", bs, &child_of_bds, BDRV_CHILD_DATA,
+ false, &local_err);
if (local_err) {
ret = -EINVAL;
error_propagate(errp, local_err);
diff --git a/block/quorum.c b/block/quorum.c
index d37b77a522..616ac3a927 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -977,7 +977,8 @@ static int quorum_open(BlockDriverState *bs, QDict
*options, int flags,
assert(ret < 32);
s->children[i] = bdrv_open_child(NULL, options, indexstr, bs,
- &child_format, 0, false, &local_err);
+ &child_of_bds, BDRV_CHILD_DATA, false,
+ &local_err);
if (local_err) {
ret = -EINVAL;
goto close_exit;
@@ -1053,7 +1054,8 @@ static void quorum_add_child(BlockDriverState *bs,
BlockDriverState *child_bs,
/* We can safely add the child now */
bdrv_ref(child_bs);
- child = bdrv_attach_child(bs, child_bs, indexstr, &child_format, 0, errp);
+ child = bdrv_attach_child(bs, child_bs, indexstr, &child_of_bds,
+ BDRV_CHILD_DATA, errp);
if (child == NULL) {
s->next_child_index--;
goto out;
--
2.25.4
- [PULL 28/51] block: Pull out bdrv_default_perms_for_cow(), (continued)
- [PULL 28/51] block: Pull out bdrv_default_perms_for_cow(), Kevin Wolf, 2020/05/15
- [PULL 27/51] block: Distinguish paths in *_format_default_perms, Kevin Wolf, 2020/05/15
- [PULL 26/51] block: Add child_of_bds, Kevin Wolf, 2020/05/15
- [PULL 29/51] block: Pull out bdrv_default_perms_for_storage(), Kevin Wolf, 2020/05/15
- [PULL 21/51] block: Rename bdrv_inherited_options(), Kevin Wolf, 2020/05/15
- [PULL 24/51] block: Unify bdrv_child_cb_attach(), Kevin Wolf, 2020/05/15
- [PULL 30/51] block: Relax *perms_for_storage for data children, Kevin Wolf, 2020/05/15
- [PULL 31/51] block: Add bdrv_default_perms(), Kevin Wolf, 2020/05/15
- [PULL 32/51] raw-format: Split raw_read_options(), Kevin Wolf, 2020/05/15
- [PULL 34/51] block: Drop child_format, Kevin Wolf, 2020/05/15
- [PULL 33/51] block: Switch child_format users to child_of_bds,
Kevin Wolf <=
- [PULL 37/51] block: Make format drivers use child_of_bds, Kevin Wolf, 2020/05/15
- [PULL 35/51] block: Make backing files child_of_bds children, Kevin Wolf, 2020/05/15
- [PULL 36/51] block: Drop child_backing, Kevin Wolf, 2020/05/15
- [PULL 38/51] block: Make filter drivers use child_of_bds, Kevin Wolf, 2020/05/15
- [PULL 39/51] block: Use child_of_bds in remaining places, Kevin Wolf, 2020/05/15
- [PULL 40/51] tests: Use child_of_bds instead of child_file, Kevin Wolf, 2020/05/15
- [PULL 41/51] block: Use bdrv_default_perms(), Kevin Wolf, 2020/05/15
- [PULL 43/51] block: Drop bdrv_format_default_perms(), Kevin Wolf, 2020/05/15
- [PULL 46/51] block: Drop @child_class from bdrv_child_perm(), Kevin Wolf, 2020/05/15
- [PULL 42/51] block: Make bdrv_filter_default_perms() static, Kevin Wolf, 2020/05/15