]> git.proxmox.com Git - mirror_qemu.git/commit
block: Pull out bdrv_default_perms_for_storage()
authorMax Reitz <mreitz@redhat.com>
Wed, 13 May 2020 11:05:27 +0000 (13:05 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 May 2020 17:05:25 +0000 (19:05 +0200)
commit6f838a4b73d9c85e498f94c28109dde0efc1cb9d
treeb3006c528d56869d01a3d89bc8934e0b74e951c7
parent70082db4efab1bc91467a9207c6e3f554a8e6bac
block: Pull out bdrv_default_perms_for_storage()

Right now, bdrv_format_default_perms() is used by format parents
(generally). We want to switch to a model where most parents use a
single BdrvChildClass, which then decides the permissions based on the
child role. To do so, we have to split bdrv_format_default_perms() into
separate functions for each such role.

Note that bdrv_default_perms_for_storage() currently handles all DATA |
METADATA children.  A follow-up patch is going to split it further into
one function for each case.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200513110544.176672-18-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c