[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 06/43] block: Request child permissions in filter
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH v2 06/43] block: Request child permissions in filter drivers |
Date: |
Mon, 27 Feb 2017 21:09:07 +0100 |
All callers will have to request permissions for all of their child
nodes. Block drivers that act as simply filters can use the default
implementation of .bdrv_child_perm().
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
block/blkdebug.c | 2 ++
block/blkreplay.c | 1 +
block/blkverify.c | 1 +
block/quorum.c | 2 ++
block/raw-format.c | 1 +
block/replication.c | 1 +
6 files changed, 8 insertions(+)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 6117ce5..67e8024 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -734,6 +734,8 @@ static BlockDriver bdrv_blkdebug = {
.bdrv_file_open = blkdebug_open,
.bdrv_close = blkdebug_close,
.bdrv_reopen_prepare = blkdebug_reopen_prepare,
+ .bdrv_child_perm = bdrv_filter_default_perms,
+
.bdrv_getlength = blkdebug_getlength,
.bdrv_truncate = blkdebug_truncate,
.bdrv_refresh_filename = blkdebug_refresh_filename,
diff --git a/block/blkreplay.c b/block/blkreplay.c
index cfc8c5b..e110211 100755
--- a/block/blkreplay.c
+++ b/block/blkreplay.c
@@ -137,6 +137,7 @@ static BlockDriver bdrv_blkreplay = {
.bdrv_file_open = blkreplay_open,
.bdrv_close = blkreplay_close,
+ .bdrv_child_perm = bdrv_filter_default_perms,
.bdrv_getlength = blkreplay_getlength,
.bdrv_co_preadv = blkreplay_co_preadv,
diff --git a/block/blkverify.c b/block/blkverify.c
index 43a940c..9a1e21c 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -320,6 +320,7 @@ static BlockDriver bdrv_blkverify = {
.bdrv_parse_filename = blkverify_parse_filename,
.bdrv_file_open = blkverify_open,
.bdrv_close = blkverify_close,
+ .bdrv_child_perm = bdrv_filter_default_perms,
.bdrv_getlength = blkverify_getlength,
.bdrv_refresh_filename = blkverify_refresh_filename,
diff --git a/block/quorum.c b/block/quorum.c
index bdbcec6..40205fb 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -1133,6 +1133,8 @@ static BlockDriver bdrv_quorum = {
.bdrv_add_child = quorum_add_child,
.bdrv_del_child = quorum_del_child,
+ .bdrv_child_perm = bdrv_filter_default_perms,
+
.is_filter = true,
.bdrv_recurse_is_first_non_filter = quorum_recurse_is_first_non_filter,
};
diff --git a/block/raw-format.c b/block/raw-format.c
index ce34d1b..86fbc65 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -467,6 +467,7 @@ BlockDriver bdrv_raw = {
.bdrv_reopen_abort = &raw_reopen_abort,
.bdrv_open = &raw_open,
.bdrv_close = &raw_close,
+ .bdrv_child_perm = bdrv_filter_default_perms,
.bdrv_create = &raw_create,
.bdrv_co_preadv = &raw_co_preadv,
.bdrv_co_pwritev = &raw_co_pwritev,
diff --git a/block/replication.c b/block/replication.c
index eff85c7..91465cb 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -660,6 +660,7 @@ BlockDriver bdrv_replication = {
.bdrv_open = replication_open,
.bdrv_close = replication_close,
+ .bdrv_child_perm = bdrv_filter_default_perms,
.bdrv_getlength = replication_getlength,
.bdrv_co_readv = replication_co_readv,
--
1.8.3.1
- [Qemu-block] [PATCH v2 00/43] New op blocker system, part 1, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 01/43] block: Add op blocker permission constants, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 02/43] block: Add Error argument to bdrv_attach_child(), Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 03/43] block: Let callers request permissions when attaching a child node, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 04/43] block: Involve block drivers in permission granting, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 05/43] block: Default .bdrv_child_perm() for filter drivers, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 06/43] block: Request child permissions in filter drivers,
Kevin Wolf <=
- [Qemu-block] [PATCH v2 07/43] block: Default .bdrv_child_perm() for format drivers, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 08/43] block: Request child permissions in format drivers, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 09/43] vvfat: Implement .bdrv_child_perm(), Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 10/43] block: Require .bdrv_child_perm() with child nodes, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 11/43] block: Request real permissions in bdrv_attach_child(), Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 12/43] block: Add permissions to BlockBackend, Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 13/43] block: Add permissions to blk_new(), Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 14/43] block: Add error parameter to blk_insert_bs(), Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 15/43] block: Add BDRV_O_RESIZE for blk_new_open(), Kevin Wolf, 2017/02/27
- [Qemu-block] [PATCH v2 16/43] block: Request real permissions in blk_new_open(), Kevin Wolf, 2017/02/27