aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2020-05-13 13:05:16 +0200
committerKevin Wolf <kwolf@redhat.com>2020-05-18 19:05:25 +0200
commitbf8e925eb569f31466eb5c9d935959a58772eec6 (patch)
treed1938c9301142c640691ea22f58f68edc81472c7 /block
parent258b776515cc812a26783ffab98b31aa8eb008d4 (diff)
block: Pass BdrvChildRole to bdrv_child_perm()
For now, all callers pass 0 and no callee evaluates this value. Later patches will change both. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200513110544.176672-7-mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/backup-top.c3
-rw-r--r--block/blkdebug.c5
-rw-r--r--block/blklogwrites.c9
-rw-r--r--block/commit.c1
-rw-r--r--block/copy-on-read.c1
-rw-r--r--block/mirror.c1
-rw-r--r--block/quorum.c1
-rw-r--r--block/replication.c1
-rw-r--r--block/vvfat.c1
9 files changed, 16 insertions, 7 deletions
diff --git a/block/backup-top.c b/block/backup-top.c
index f891dd7838..e2b4d2acd3 100644
--- a/block/backup-top.c
+++ b/block/backup-top.c
@@ -123,6 +123,7 @@ static void backup_top_refresh_filename(BlockDriverState *bs)
static void backup_top_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
@@ -155,7 +156,7 @@ static void backup_top_child_perm(BlockDriverState *bs, BdrvChild *c,
*nperm = BLK_PERM_WRITE;
} else {
/* Source child */
- bdrv_filter_default_perms(bs, c, child_class, reopen_queue,
+ bdrv_filter_default_perms(bs, c, child_class, role, reopen_queue,
perm, shared, nperm, nshared);
if (perm & BLK_PERM_WRITE) {
diff --git a/block/blkdebug.c b/block/blkdebug.c
index c91e78d5c8..8dd8ed6055 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -994,14 +994,15 @@ static int blkdebug_reopen_prepare(BDRVReopenState *reopen_state,
static void blkdebug_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
{
BDRVBlkdebugState *s = bs->opaque;
- bdrv_filter_default_perms(bs, c, child_class, reopen_queue, perm, shared,
- nperm, nshared);
+ bdrv_filter_default_perms(bs, c, child_class, role, reopen_queue,
+ perm, shared, nperm, nshared);
*nperm |= s->take_child_perms;
*nshared &= ~s->unshare_child_perms;
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
index 739db6dcf6..4faf912ef1 100644
--- a/block/blklogwrites.c
+++ b/block/blklogwrites.c
@@ -283,6 +283,7 @@ static int64_t blk_log_writes_getlength(BlockDriverState *bs)
static void blk_log_writes_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *ro_q,
uint64_t perm, uint64_t shrd,
uint64_t *nperm, uint64_t *nshrd)
@@ -294,11 +295,11 @@ static void blk_log_writes_child_perm(BlockDriverState *bs, BdrvChild *c,
}
if (!strcmp(c->name, "log")) {
- bdrv_format_default_perms(bs, c, child_class, ro_q, perm, shrd, nperm,
- nshrd);
+ bdrv_format_default_perms(bs, c, child_class, role, ro_q, perm, shrd,
+ nperm, nshrd);
} else {
- bdrv_filter_default_perms(bs, c, child_class, ro_q, perm, shrd, nperm,
- nshrd);
+ bdrv_filter_default_perms(bs, c, child_class, role, ro_q, perm, shrd,
+ nperm, nshrd);
}
}
diff --git a/block/commit.c b/block/commit.c
index 834eeae412..6af1c808bc 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -224,6 +224,7 @@ static void bdrv_commit_top_refresh_filename(BlockDriverState *bs)
static void bdrv_commit_top_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
diff --git a/block/copy-on-read.c b/block/copy-on-read.c
index a2c4e6dc58..a2d92ac394 100644
--- a/block/copy-on-read.c
+++ b/block/copy-on-read.c
@@ -52,6 +52,7 @@ static int cor_open(BlockDriverState *bs, QDict *options, int flags,
static void cor_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
diff --git a/block/mirror.c b/block/mirror.c
index d6598463d5..cb4bdad32a 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1493,6 +1493,7 @@ static void bdrv_mirror_top_refresh_filename(BlockDriverState *bs)
static void bdrv_mirror_top_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
diff --git a/block/quorum.c b/block/quorum.c
index 024de76e6f..d37b77a522 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -1152,6 +1152,7 @@ static char *quorum_dirname(BlockDriverState *bs, Error **errp)
static void quorum_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
diff --git a/block/replication.c b/block/replication.c
index 052c7ef601..ea87b1a4f0 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -164,6 +164,7 @@ static void replication_close(BlockDriverState *bs)
static void replication_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)
diff --git a/block/vvfat.c b/block/vvfat.c
index cd8ae50a2c..6cf3c74fe3 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -3211,6 +3211,7 @@ err:
static void vvfat_child_perm(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
+ BdrvChildRole role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared)