Skip to content
  • Vladimir Sementsov-Ogievskiy's avatar
    e9238278
    block: introduce bdrv_set_file_or_backing_noperm() · e9238278
    Vladimir Sementsov-Ogievskiy authored
    
    
    To be used for reopen in future commit.
    
    Notes:
     - It seems OK to update inherits_from if new bs is recursively inherits
     from parent bs. Let's just not check for backing_chain_contains, to
     support file child of non-filters.
    
     - Simply check child->frozen instead of
       bdrv_is_backing_chain_frozen(), as we really interested only in this
       one child.
    
     - Role determination of new child is a bit more complex: it remains
       the same for backing child, it's obvious for filter driver. But for
       non-filter file child let's for now restrict to only replacing
       existing child (and keeping its role).
    
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20210610120537.196183-3-vsementsov@virtuozzo.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    e9238278
    block: introduce bdrv_set_file_or_backing_noperm()
    Vladimir Sementsov-Ogievskiy authored
    
    
    To be used for reopen in future commit.
    
    Notes:
     - It seems OK to update inherits_from if new bs is recursively inherits
     from parent bs. Let's just not check for backing_chain_contains, to
     support file child of non-filters.
    
     - Simply check child->frozen instead of
       bdrv_is_backing_chain_frozen(), as we really interested only in this
       one child.
    
     - Role determination of new child is a bit more complex: it remains
       the same for backing child, it's obvious for filter driver. But for
       non-filter file child let's for now restrict to only replacing
       existing child (and keeping its role).
    
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20210610120537.196183-3-vsementsov@virtuozzo.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading