Skip to content
  • Hanna Reitz's avatar
    d8da3cef
    block: Add blk_remove_all_bs() · d8da3cef
    Hanna Reitz authored
    
    
    When bdrv_close_all() is called, instead of force-closing all root
    BlockDriverStates, it is better to just drop the reference from all
    BlockBackends and let them be closed automatically. This prevents BDS
    from getting closed that are still referenced by other BDS, which may
    result in loss of cached data.
    
    This patch adds a function for doing that, but does not yet incorporate
    it in bdrv_close_all().
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    d8da3cef
    block: Add blk_remove_all_bs()
    Hanna Reitz authored
    
    
    When bdrv_close_all() is called, instead of force-closing all root
    BlockDriverStates, it is better to just drop the reference from all
    BlockBackends and let them be closed automatically. This prevents BDS
    from getting closed that are still referenced by other BDS, which may
    result in loss of cached data.
    
    This patch adds a function for doing that, but does not yet incorporate
    it in bdrv_close_all().
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading