[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-5.0 18/31] block: Switch child_format users to child_of_bds
From: |
Max Reitz |
Subject: |
[PATCH for-5.0 18/31] block: Switch child_format users to child_of_bds |
Date: |
Wed, 27 Nov 2019 14:16:11 +0100 |
Both users (quorum and blkverify) use child_format for
not-really-filtered children, so the appropriate BdrvChildRole in both
cases is DATA | FORMAT.
Signed-off-by: Max Reitz <address@hidden>
---
block/blkverify.c | 5 +++--
block/quorum.c | 9 ++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index ba4f6d7b7c..4f4d079b12 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -134,8 +134,9 @@ 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 | BDRV_CHILD_FORMAT,
+ false, &local_err);
if (local_err) {
ret = -EINVAL;
error_propagate(errp, local_err);
diff --git a/block/quorum.c b/block/quorum.c
index a6b2d73668..29f7a14e7c 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -997,8 +997,10 @@ static int quorum_open(BlockDriverState *bs, QDict
*options, int flags,
assert(ret < 32);
s->children[i].child = bdrv_open_child(NULL, options, indexstr, bs,
- &child_format, 0, false,
- &local_err);
+ &child_of_bds,
+ BDRV_CHILD_DATA |
+ BDRV_CHILD_FORMAT,
+ false, &local_err);
if (local_err) {
ret = -EINVAL;
goto close_exit;
@@ -1074,7 +1076,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 | BDRV_CHILD_FORMAT, errp);
if (child == NULL) {
s->next_child_index--;
goto out;
--
2.23.0
- [PATCH for-5.0 23/31] block: Make filter drivers use child_of_bds, (continued)
- [PATCH for-5.0 23/31] block: Make filter drivers use child_of_bds, Max Reitz, 2019/11/27
- [PATCH for-5.0 22/31] block: Make format drivers use child_of_bds, Max Reitz, 2019/11/27
- [PATCH for-5.0 24/31] block: Use child_of_bds in remaining places, Max Reitz, 2019/11/27
- [PATCH for-5.0 25/31] tests: Use child_of_bds instead of child_file, Max Reitz, 2019/11/27
- [PATCH for-5.0 27/31] block: Make bdrv_filter_default_perms() static, Max Reitz, 2019/11/27
- [PATCH for-5.0 26/31] block: Use bdrv_default_perms(), Max Reitz, 2019/11/27
- [PATCH for-5.0 28/31] block: Drop bdrv_format_default_perms(), Max Reitz, 2019/11/27
- [PATCH for-5.0 31/31] block: Drop @child_class from bdrv_child_perm(), Max Reitz, 2019/11/27
- [PATCH for-5.0 30/31] block: Pass BdrvChildRole in remaining cases, Max Reitz, 2019/11/27
- [PATCH for-5.0 29/31] block: Drop child_file, Max Reitz, 2019/11/27
- [PATCH for-5.0 18/31] block: Switch child_format users to child_of_bds,
Max Reitz <=