qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]