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>
This commit is contained in:
Max Reitz 2020-05-13 13:05:16 +02:00 committed by Kevin Wolf
parent 258b776515
commit bf8e925eb5
13 changed files with 36 additions and 20 deletions

View file

@ -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);
}
}