Skip to content
  • Hanna Reitz's avatar
    8b8277cd
    block: Drop bdrv_is_encrypted() · 8b8277cd
    Hanna Reitz authored
    
    
    The original purpose of bdrv_is_encrypted() was to inquire whether a BDS
    can be used without the user entering a password or not.  It has not
    been used for that purpose for quite some time.
    
    Actually, it is not even fit for that purpose, because to answer that
    question, it would have recursively query all of the given node's
    children.
    
    So now we have to decide in which direction we want to fix
    bdrv_is_encrypted(): Recursively query all children, or drop it and just
    use bs->encrypted to get the current node's status?
    
    Nowadays, its only purpose is to report through bdrv_query_image_info()
    whether the given image is encrypted or not.  For this purpose, it is
    probably more interesting to see whether a given node itself is
    encrypted or not (otherwise, a management application cannot discern for
    certain which nodes are really encrypted and which just have encrypted
    children).
    
    Suggested-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
    8b8277cd
    block: Drop bdrv_is_encrypted()
    Hanna Reitz authored
    
    
    The original purpose of bdrv_is_encrypted() was to inquire whether a BDS
    can be used without the user entering a password or not.  It has not
    been used for that purpose for quite some time.
    
    Actually, it is not even fit for that purpose, because to answer that
    question, it would have recursively query all of the given node's
    children.
    
    So now we have to decide in which direction we want to fix
    bdrv_is_encrypted(): Recursively query all children, or drop it and just
    use bs->encrypted to get the current node's status?
    
    Nowadays, its only purpose is to report through bdrv_query_image_info()
    whether the given image is encrypted or not.  For this purpose, it is
    probably more interesting to see whether a given node itself is
    encrypted or not (otherwise, a management application cannot discern for
    certain which nodes are really encrypted and which just have encrypted
    children).
    
    Suggested-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Reviewed-by: default avatarAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
    Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading