[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3] specs/qcow2: Fix documentation of the compre
Re: [Qemu-block] [PATCH v3] specs/qcow2: Fix documentation of the compressed cluster descriptor
Wed, 21 Feb 2018 17:15:55 +0100
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)
On Wed 21 Feb 2018 05:10:30 PM CET, Eric Blake wrote:
>> Compressed Clusters Descriptor (x = 62 - (cluster_bits - 8)):
>> - Bit 0 - x: Host cluster offset. This is usually _not_ aligned to a
>> - cluster boundary!
>> + Bit 0 - x-1: Host cluster offset. This is usually _not_ aligned to a
>> + cluster or sector boundary!
> This breaks the nice alignment of the ':' character that the rest of the
> section preserves. You could also have done:
> Compressed Clusters Descriptor (x = 61 - (cluster_bits - 8)):
> Bit 0 - x: ...
> x+1 - 61: ...
> to preserve the alignment, by shifting the adjustment into the
> calculation of x. But I'm fine with either approach.
Yeah I actually saw the same problem, in the end I chose this one
because the numbers match the implementation:
s->csize_shift = (62 - (s->cluster_bits - 8));
Thanks for reviewing!