Skip to content
  • Hanna Reitz's avatar
    48410829
    qcow2: Force preallocation with data-file-raw · 48410829
    Hanna Reitz authored
    
    
    Setting the qcow2 data-file-raw bit means that you can ignore the
    qcow2 metadata when reading from the external data file.  It does not
    mean that you have to ignore it, though.  Therefore, the data read must
    be the same regardless of whether you interpret the metadata or whether
    you ignore it, and thus the L1/L2 tables must all be present and give a
    1:1 mapping.
    
    This patch changes 244's output: First, the qcow2 file is larger right
    after creation, because of metadata preallocation.  Second, the qemu-img
    map output changes: Everything that was not explicitly discarded or
    zeroed is now a data area.
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-Id: <20210326145509.163455-2-mreitz@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    48410829
    qcow2: Force preallocation with data-file-raw
    Hanna Reitz authored
    
    
    Setting the qcow2 data-file-raw bit means that you can ignore the
    qcow2 metadata when reading from the external data file.  It does not
    mean that you have to ignore it, though.  Therefore, the data read must
    be the same regardless of whether you interpret the metadata or whether
    you ignore it, and thus the L1/L2 tables must all be present and give a
    1:1 mapping.
    
    This patch changes 244's output: First, the qcow2 file is larger right
    after creation, because of metadata preallocation.  Second, the qemu-img
    map output changes: Everything that was not explicitly discarded or
    zeroed is now a data area.
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-Id: <20210326145509.163455-2-mreitz@redhat.com>
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Loading