[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 08/46] block: Request child permissions in filter dri
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 08/46] block: Request child permissions in filter drivers |
Date: |
Tue, 28 Feb 2017 21:36: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>
Acked-by: Fam Zheng <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] [PULL 00/46] Block layer patches, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 02/46] option: Tweak invalid size error message and unbreak iotest 049, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 03/46] block: Add op blocker permission constants, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 01/46] qemu-img: make convert async, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 04/46] block: Add Error argument to bdrv_attach_child(), Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 05/46] block: Let callers request permissions when attaching a child node, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 07/46] block: Default .bdrv_child_perm() for filter drivers, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 06/46] block: Involve block drivers in permission granting, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 08/46] block: Request child permissions in filter drivers,
Kevin Wolf <=
- [Qemu-block] [PULL 11/46] vvfat: Implement .bdrv_child_perm(), Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 10/46] block: Request child permissions in format drivers, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 09/46] block: Default .bdrv_child_perm() for format drivers, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 12/46] block: Require .bdrv_child_perm() with child nodes, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 13/46] block: Request real permissions in bdrv_attach_child(), Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 14/46] block: Add permissions to BlockBackend, Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 15/46] block: Add permissions to blk_new(), Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 16/46] block: Add error parameter to blk_insert_bs(), Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 17/46] block: Add BDRV_O_RESIZE for blk_new_open(), Kevin Wolf, 2017/02/28
- [Qemu-block] [PULL 18/46] block: Request real permissions in blk_new_open(), Kevin Wolf, 2017/02/28