Skip to content
  • Vladimir Sementsov-Ogievskiy's avatar
    3bb0e298
    block: fix bdrv_replace_node_common · 3bb0e298
    Vladimir Sementsov-Ogievskiy authored
    
    
    inore_children thing doesn't help to track all propagated permissions
    of children we want to ignore. The simplest way to correctly update
    permissions is update graph first and then do permission update. In
    this case we just referesh permissions for the whole subgraph (in
    topological-sort defined order) and everything is correctly calculated
    automatically without any ignore_children.
    
    So, refactor bdrv_replace_node_common to first do graph update and then
    refresh the permissions.
    
    Test test_parallel_exclusive_write() now pass, so move it out of
    debugging "if".
    
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20210428151804.439460-18-vsementsov@virtuozzo.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    3bb0e298
    block: fix bdrv_replace_node_common
    Vladimir Sementsov-Ogievskiy authored
    
    
    inore_children thing doesn't help to track all propagated permissions
    of children we want to ignore. The simplest way to correctly update
    permissions is update graph first and then do permission update. In
    this case we just referesh permissions for the whole subgraph (in
    topological-sort defined order) and everything is correctly calculated
    automatically without any ignore_children.
    
    So, refactor bdrv_replace_node_common to first do graph update and then
    refresh the permissions.
    
    Test test_parallel_exclusive_write() now pass, so move it out of
    debugging "if".
    
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20210428151804.439460-18-vsementsov@virtuozzo.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading