• K
    qcow2: Fix metadata preallocation · ea80b906
    Kevin Wolf 提交于
    The wrong version of the preallocation patch has been applied, so this is the
    remaining diff.
    
    We can't use truncate to grow the image file to the right size because we don't
    know if metadata has been written after the last data cluster. In this case
    truncate would shrink the file and destroy its metadata. Write a zero sector at
    the end of the virtual disk instead to ensure that the file is big enough.
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
    ea80b906
qcow2.c 32.4 KB