On 29.02.2016 16:42, Max Reitz wrote: > On 29.02.2016 16:11, Eric Blake wrote: >> The specs for the host cluster offset of a compressed cluster >> were not clear that the offset is in terms of sectors, and requires >> a shift by 9 to be a byte offset. Add some more text to make the >> interpretation obvious. >> >> CC: [email protected] >> Signed-off-by: Eric Blake <[email protected]> >> --- >> docs/specs/qcow2.txt | 9 +++++++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >> >> diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt >> index 80cdfd0..7049415 100644 >> --- a/docs/specs/qcow2.txt >> +++ b/docs/specs/qcow2.txt >> @@ -323,11 +323,16 @@ Standard Cluster Descriptor: >> >> 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: Bits 9-(x+9) of host cluster offset. This is > > I'd rather use one of "9..(x+9)", "[9, x+9]", "9 - (x+9)", "9—(x+9)" in > order to clarify that this is not a minus but a range.
...unless, of course, this is actually a byte offset, which it seems to be, judging from qcow2_get_cluster_offset() (and qcow2_decompress_cluster(), as Kevin said on IRC). Max
signature.asc
Description: OpenPGP digital signature
