Skip to content

Commit

Permalink
block: Drop bdrv_format_default_perms()
Browse files Browse the repository at this point in the history
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200513110544.176672-32-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
XanClic authored and kevmw committed May 18, 2020
1 parent 87278af commit 9aab945
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
19 changes: 0 additions & 19 deletions block.c
Expand Up @@ -2517,25 +2517,6 @@ static void bdrv_default_perms_for_storage(BlockDriverState *bs, BdrvChild *c,
*nshared = shared;
}

void bdrv_format_default_perms(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)
{
if (child_class == &child_of_bds) {
bdrv_default_perms(bs, c, child_class, role, reopen_queue,
perm, shared, nperm, nshared);
return;
}

assert(child_class == &child_file);

bdrv_default_perms_for_storage(bs, c, child_class, role, reopen_queue,
perm, shared, nperm, nshared);
}

void bdrv_default_perms(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class, BdrvChildRole role,
BlockReopenQueue *reopen_queue,
Expand Down
11 changes: 0 additions & 11 deletions include/block/block_int.h
Expand Up @@ -1262,17 +1262,6 @@ int bdrv_child_try_set_perm(BdrvChild *c, uint64_t perm, uint64_t shared,
*/
int bdrv_child_refresh_perms(BlockDriverState *bs, BdrvChild *c, Error **errp);

/* Default implementation for BlockDriver.bdrv_child_perm() that can be used by
* (non-raw) image formats: Like above for bs->backing, but for bs->file it
* requires WRITE | RESIZE for read-write images, always requires
* CONSISTENT_READ and doesn't share WRITE. */
void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c,
const BdrvChildClass *child_class,
BdrvChildRole child_role,
BlockReopenQueue *reopen_queue,
uint64_t perm, uint64_t shared,
uint64_t *nperm, uint64_t *nshared);

bool bdrv_recurse_can_replace(BlockDriverState *bs,
BlockDriverState *to_replace);

Expand Down

0 comments on commit 9aab945

Please sign in to comment.