]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: Default .bdrv_child_perm() for format drivers
authorKevin Wolf <kwolf@redhat.com>
Mon, 19 Dec 2016 14:21:48 +0000 (15:21 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Feb 2017 19:40:36 +0000 (20:40 +0100)
commit6b1a044afb363f03b51c9d0218bef44a34ea98c3
tree15a63fbf16840c39c0b921308e6b52dce757ee11
parentd7010dfb685506cc4addd102627205f85fcd0fe7
block: Default .bdrv_child_perm() for format drivers

Almost all format drivers have the same characteristics as far as
permissions are concerned: They have one or more children for storing
their own data and, more importantly, metadata (can be written to and
grow even without external write requests, must be protected against
other writers and present consistent data) and optionally a backing file
(this is just data, so like for a filter, it only depends on what the
parent nodes need).

This provides a default implementation that can be shared by most of
our format drivers.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c
include/block/block_int.h