• K
    block: Involve block drivers in permission granting · 33a610c3
    Kevin Wolf 提交于
    In many cases, the required permissions of one node on its children
    depend on what its parents require from it. For example, the raw format
    or most filter drivers only need to request consistent reads if that's
    something that one of their parents wants.
    
    In order to achieve this, this patch introduces two new BlockDriver
    callbacks. The first one lets drivers first check (recursively) whether
    the requested permissions can be set; the second one actually sets the
    new permission bitmask.
    
    Also add helper functions that drivers can use in their implementation
    of the callbacks to update their permissions on a specific child.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Acked-by: NFam Zheng <famz@redhat.com>
    Reviewed-by: NMax Reitz <mreitz@redhat.com>
    33a610c3
block_int.h 35.6 KB