[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 20/33] block: Switch child_format users to child_of_bds
From: |
Max Reitz |
Subject: |
[PATCH v3 20/33] block: Switch child_format users to child_of_bds |
Date: |
Tue, 18 Feb 2020 13:42:29 +0100 |
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>
---
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.24.1
- [PATCH v3 09/33] block: Add generic bdrv_inherited_options(), (continued)
- [PATCH v3 09/33] block: Add generic bdrv_inherited_options(), Max Reitz, 2020/02/18
- [PATCH v3 12/33] block: Unify bdrv_child_cb_detach(), Max Reitz, 2020/02/18
- [PATCH v3 11/33] block: Unify bdrv_child_cb_attach(), Max Reitz, 2020/02/18
- [PATCH v3 13/33] block: Add child_of_bds, Max Reitz, 2020/02/18
- [PATCH v3 14/33] block: Distinguish paths in *_format_default_perms, Max Reitz, 2020/02/18
- [PATCH v3 15/33] block: Pull out bdrv_default_perms_for_backing(), Max Reitz, 2020/02/18
- [PATCH v3 17/33] block: Split bdrv_default_perms_for_storage(), Max Reitz, 2020/02/18
- [PATCH v3 18/33] block: Add bdrv_default_perms(), Max Reitz, 2020/02/18
- [PATCH v3 16/33] block: Pull out bdrv_default_perms_for_storage(), Max Reitz, 2020/02/18
- [PATCH v3 19/33] raw-format: Split raw_read_options(), Max Reitz, 2020/02/18
- [PATCH v3 20/33] block: Switch child_format users to child_of_bds,
Max Reitz <=
- [PATCH v3 21/33] block: Drop child_format, Max Reitz, 2020/02/18
- [PATCH v3 22/33] block: Make backing files child_of_bds children, Max Reitz, 2020/02/18
- [PATCH v3 24/33] block: Make format drivers use child_of_bds, Max Reitz, 2020/02/18
- [PATCH v3 23/33] block: Drop child_backing, Max Reitz, 2020/02/18
- [PATCH v3 25/33] block: Make filter drivers use child_of_bds, Max Reitz, 2020/02/18
- [PATCH v3 26/33] block: Use child_of_bds in remaining places, Max Reitz, 2020/02/18
- [PATCH v3 27/33] tests: Use child_of_bds instead of child_file, Max Reitz, 2020/02/18
- [PATCH v3 29/33] block: Make bdrv_filter_default_perms() static, Max Reitz, 2020/02/18
- [PATCH v3 28/33] block: Use bdrv_default_perms(), Max Reitz, 2020/02/18