Fix error message about compressed clusters with OFLAG_COPIED
commit74c44a59348f7fac96c32621e37ee636546f26f8
authorAlberto Garcia <berto@igalia.com>
Tue, 10 Apr 2018 16:05:03 +0000 (10 18:05 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 15 May 2018 14:15:21 +0000 (15 16:15 +0200)
tree6e8c3136aa35519498fb5a36bfd9fae4a70b5d53
parent6cba5377f54d7ea859a29c1877785e7101794683
Fix error message about compressed clusters with OFLAG_COPIED

Compressed clusters are not supposed to have the COPIED bit set.
"qemu-img check" detects that and prints an error message reporting
the number of the affected host cluster. This doesn't make much sense
because compressed clusters are not aligned to host clusters, so it
would be better to report the offset instead. Plus, the calculation is
wrong and it uses the raw L2 entry as if it was simply an offset.

This patch fixes the error message and reports the offset of the
compressed cluster.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 0f687957feb72e80c740403191a47e607c2463fe.1523376013.git.berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2-refcount.c