[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 22/34] block: Drop child_format
From: |
Max Reitz |
Subject: |
[PATCH v4 22/34] block: Drop child_format |
Date: |
Wed, 13 May 2020 13:05:32 +0200 |
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
include/block/block_int.h | 1 -
block.c | 29 -----------------------------
2 files changed, 30 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 3a9dda9be7..4b09fa1124 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -742,7 +742,6 @@ struct BdrvChildClass {
extern const BdrvChildClass child_of_bds;
extern const BdrvChildClass child_file;
-extern const BdrvChildClass child_format;
extern const BdrvChildClass child_backing;
struct BdrvChild {
diff --git a/block.c b/block.c
index 088727fdbe..85b4f947ba 100644
--- a/block.c
+++ b/block.c
@@ -1172,35 +1172,6 @@ const BdrvChildClass child_file = {
.set_aio_ctx = bdrv_child_cb_set_aio_ctx,
};
-/*
- * Returns the options and flags that bs->file should get if the use of formats
- * (and not only protocols) is permitted for it, based on the given options and
- * flags for the parent BDS
- */
-static void bdrv_inherited_fmt_options(BdrvChildRole role,
- bool parent_is_format,
- int *child_flags, QDict *child_options,
- int parent_flags, QDict *parent_options)
-{
- bdrv_inherited_options(BDRV_CHILD_DATA, false,
- child_flags, child_options,
- parent_flags, parent_options);
-}
-
-const BdrvChildClass child_format = {
- .parent_is_bds = true,
- .get_parent_desc = bdrv_child_get_parent_desc,
- .inherit_options = bdrv_inherited_fmt_options,
- .drained_begin = bdrv_child_cb_drained_begin,
- .drained_poll = bdrv_child_cb_drained_poll,
- .drained_end = bdrv_child_cb_drained_end,
- .attach = bdrv_child_cb_attach,
- .detach = bdrv_child_cb_detach,
- .inactivate = bdrv_child_cb_inactivate,
- .can_set_aio_ctx = bdrv_child_cb_can_set_aio_ctx,
- .set_aio_ctx = bdrv_child_cb_set_aio_ctx,
-};
-
static void bdrv_backing_attach(BdrvChild *c)
{
BlockDriverState *parent = c->opaque;
--
2.26.2
- Re: [PATCH v4 15/34] block: Distinguish paths in *_format_default_perms, (continued)
- [PATCH v4 16/34] block: Pull out bdrv_default_perms_for_cow(), Max Reitz, 2020/05/13
- [PATCH v4 17/34] block: Pull out bdrv_default_perms_for_storage(), Max Reitz, 2020/05/13
- [PATCH v4 18/34] block: Relax *perms_for_storage for data children, Max Reitz, 2020/05/13
- [PATCH v4 19/34] block: Add bdrv_default_perms(), Max Reitz, 2020/05/13
- [PATCH v4 20/34] raw-format: Split raw_read_options(), Max Reitz, 2020/05/13
- [PATCH v4 21/34] block: Switch child_format users to child_of_bds, Max Reitz, 2020/05/13
- [PATCH v4 22/34] block: Drop child_format,
Max Reitz <=
- [PATCH v4 23/34] block: Make backing files child_of_bds children, Max Reitz, 2020/05/13
- [PATCH v4 24/34] block: Drop child_backing, Max Reitz, 2020/05/13
- [PATCH v4 26/34] block: Make filter drivers use child_of_bds, Max Reitz, 2020/05/13
- [PATCH v4 27/34] block: Use child_of_bds in remaining places, Max Reitz, 2020/05/13
- [PATCH v4 25/34] block: Make format drivers use child_of_bds, Max Reitz, 2020/05/13
- [PATCH v4 28/34] tests: Use child_of_bds instead of child_file, Max Reitz, 2020/05/13