qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

qemu-img create with preallocation=full and cluster-size=2M produces a b


From: Bryan S Rosenburg
Subject: qemu-img create with preallocation=full and cluster-size=2M produces a bad file
Date: Fri, 11 Sep 2020 10:30:45 -0400

The subject line says it all:

======================================================
$ qemu-img --version
qemu-img version 4.2.0 (Debian 1:4.2-3ubuntu6.4)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

$ qemu-img create -f qcow2 prealloc_4G_2M.qcow2 4G -o preallocation=full,cluster_size=2M
Formatting 'prealloc_4G_2M.qcow2', fmt=qcow2 size=4294967296 cluster_size=2097152 preallocation=full lazy_refcounts=off refcount_bits=16

$ qemu-img check prealloc_4G_2M.qcow2
ERROR: coffset=0x1ffff80a00000: copied flag must never be set for compressed clusters
ERROR: counting reference for region exceeding the end of the file by one cluster or more: offset 0x1ffff80a00000 size 0x400000
ERROR: coffset=0x1ffff80c00000: copied flag must never be set for compressed clusters
ERROR: counting reference for region exceeding the end of the file by one cluster or more: offset 0x1ffff80c00000 size 0x400000
. . . 1015 REPEATS SNIPPED . . .
ERROR: coffset=0x1ffffffc00000: copied flag must never be set for compressed clusters
ERROR: counting reference for region exceeding the end of the file by one cluster or more: offset 0x1ffffffc00000 size 0x400000
ERROR: coffset=0x1ffffffe00000: copied flag must never be set for compressed clusters
ERROR: counting reference for region exceeding the end of the file by one cluster or more: offset 0x1ffffffe00000 size 0x400000
ERROR refcount block 0 refcount=2
ERROR cluster 1 refcount=1 reference=2
ERROR cluster 2 refcount=1 reference=2
ERROR cluster 3 refcount=1 reference=2
ERROR cluster 4 refcount=1 reference=2
Leaked cluster 1029 refcount=1 reference=0
Leaked cluster 1030 refcount=1 reference=0
. . . 1020 REPEATS SNIPPED . . .
Leaked cluster 2051 refcount=1 reference=0
Leaked cluster 2052 refcount=1 reference=0

2043 errors were found on the image.
Data may be corrupted, or further writes to the image may corrupt it.

1024 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
2047/2048 = 99.95% allocated, 49.83% fragmented, 49.78% compressed clusters
Image end offset: 4305453056
======================================================

I get similar failures with other combinations of size and cluster-size. Has this problem been reported and/or fixed already?

Bryan Rosenburg
IBM T.J. Watson Research Center
rosnbrg@us.ibm.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]