Skip to content
  • Hanna Reitz's avatar
    26518061
    block: Drop detached child from ignore list · 26518061
    Hanna Reitz authored
    
    
    bdrv_attach_child_common_abort() restores the parent's AioContext.  To
    do so, the child (which was supposed to be attached, but is now detached
    again by this abort handler) is added to the ignore list for the
    AioContext changing functions.
    
    However, since we modify a BDS's children list in the BdrvChildClass's
    .attach and .detach handlers, the child is already effectively detached
    from the parent by this point.  We do not need to put it into the ignore
    list.
    
    Use this opportunity to clean up the empty line structure: Keep setting
    the ignore list, invoking the AioContext function, and freeing the
    ignore list in blocks separated by empty lines.
    
    Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20211111120829.81329-5-hreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20211115145409.176785-5-kwolf@redhat.com>
    Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
    26518061
    block: Drop detached child from ignore list
    Hanna Reitz authored
    
    
    bdrv_attach_child_common_abort() restores the parent's AioContext.  To
    do so, the child (which was supposed to be attached, but is now detached
    again by this abort handler) is added to the ignore list for the
    AioContext changing functions.
    
    However, since we modify a BDS's children list in the BdrvChildClass's
    .attach and .detach handlers, the child is already effectively detached
    from the parent by this point.  We do not need to put it into the ignore
    list.
    
    Use this opportunity to clean up the empty line structure: Keep setting
    the ignore list, invoking the AioContext function, and freeing the
    ignore list in blocks separated by empty lines.
    
    Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20211111120829.81329-5-hreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Message-Id: <20211115145409.176785-5-kwolf@redhat.com>
    Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
Loading