Skip to content
Snippets Groups Projects
  • Kevin Wolf's avatar
    dafe0960
    block: Fix permissions in image activation · dafe0960
    Kevin Wolf authored
    
    Inactive images generally request less permissions for their image files
    than they would if they were active (in particular, write permissions).
    Activating the image involves extending the permissions, therefore.
    
    drv->bdrv_invalidate_cache() can already require write access to the
    image file, so we have to update the permissions earlier than that.
    The current code does it only later, so we have to move up this part.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
    dafe0960
    History
    block: Fix permissions in image activation
    Kevin Wolf authored
    
    Inactive images generally request less permissions for their image files
    than they would if they were active (in particular, write permissions).
    Activating the image involves extending the permissions, therefore.
    
    drv->bdrv_invalidate_cache() can already require write access to the
    image file, so we have to update the permissions earlier than that.
    The current code does it only later, so we have to move up this part.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>