On 04/10/2018 11:05 AM, Alberto Garcia wrote: > Compressed clusters are not supposed to have the COPIED bit set, but > this is not made explicit in the specs, so let's document it. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > docs/interop/qcow2.txt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt > index feb711fb6a..8e1547ded2 100644 > --- a/docs/interop/qcow2.txt > +++ b/docs/interop/qcow2.txt > @@ -400,10 +400,10 @@ L2 table entry: > 62: 0 for standard clusters > 1 for compressed clusters > > - 63: 0 for a cluster that is unused or requires COW, 1 if its > - refcount is exactly one. This information is only > accurate > - in L2 tables that are reachable from the active L1 > - table. > + 63: 0 for clusters that are unused, compressed or require > COW. > + 1 for standard clusters whose refcount is exactly one. > + This information is only accurate in L2 tables > + that are reachable from the active L1 table.
This matches what qemu outputs, so the question becomes whether it is technically necessary to make this requirement mandatory for 3rd-party implementations. But I'm in favor of the tighter wording, as it gets rather hairy to check whether exactly one compressed cluster is occupying a host cluster, plus I don't want to think about what happens if a compressed cluster with the bit set crosses a host cluster boundary (does it mean that compressed cluster is the only [remaining] source of data for BOTH host clusters at once, where both the head of the first host cluster and tail of the second host cluster is unused?) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Description: OpenPGP digital signature