Skip to content
  • Hanna Reitz's avatar
    d5b23994
    block: BDRV_O_NO_IO for backing file on creation · d5b23994
    Hanna Reitz authored
    When creating an image file with a backing file, we generally try to
    open the backing file (unless -u was specified), mostly to verify that
    it is there, but also to get the file size if none was specified for the
    new image.
    
    For neither of these things do we need data I/O, and so we can pass
    BDRV_O_NO_IO when opening the backing file.  This allows us to open even
    encrypted backing images without requiring the user to provide a secret.
    
    This makes the -u switch in iotests 189 and 198 unnecessary (and the
    $size parameter), so drop it, because this way we get regression tests
    for this patch here.
    
    Fixes: https://gitlab.com/qemu-project/qemu/-/issues/441
    
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-Id: <20210622140030.212487-1-mreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    d5b23994
    block: BDRV_O_NO_IO for backing file on creation
    Hanna Reitz authored
    When creating an image file with a backing file, we generally try to
    open the backing file (unless -u was specified), mostly to verify that
    it is there, but also to get the file size if none was specified for the
    new image.
    
    For neither of these things do we need data I/O, and so we can pass
    BDRV_O_NO_IO when opening the backing file.  This allows us to open even
    encrypted backing images without requiring the user to provide a secret.
    
    This makes the -u switch in iotests 189 and 198 unnecessary (and the
    $size parameter), so drop it, because this way we get regression tests
    for this patch here.
    
    Fixes: https://gitlab.com/qemu-project/qemu/-/issues/441
    
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-Id: <20210622140030.212487-1-mreitz@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading