block: Pull out bdrv_default_perms_for_cow()
commit70082db4efab1bc91467a9207c6e3f554a8e6bac
authorMax Reitz <mreitz@redhat.com>
Wed, 13 May 2020 11:05:26 +0000 (13 13:05 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 May 2020 17:05:25 +0000 (18 19:05 +0200)
treec0a3453a8c176695dc121cc2d338754f6f3f6da6
parent33f2663bd58696ab836731830f9fb6a878a5b944
block: Pull out bdrv_default_perms_for_cow()

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.

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