From: Kevin Wolf <kwolf@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] specs/qcow2: Fix documentation of the compressed cluster descriptor
Date: Wed, 21 Feb 2018 18:08:35 +0100 [thread overview]
Message-ID: <20180221170835.GA353@localhost.localdomain> (raw)
In-Reply-To: <20180221140849.16068-1-berto@igalia.com>
Am 21.02.2018 um 15:08 hat Alberto Garcia geschrieben:
> This patch fixes several mistakes in the documentation of the
> compressed cluster descriptor:
>
> 1) the documentation claims that the cluster descriptor contains the
> number of sectors used to store the compressed data, but what it
> actually contains is the number of sectors *minus one* or, in other
> words, the number of additional sectors after the first one.
>
> 2) the width of the fields is incorrectly specified. The number of bits
> used by each field is
>
> x = 62 - (cluster_bits - 8) for the offset field
> y = (cluster_bits - 8) for the size field
>
> So the offset field's location is [0, x-1], not [0, x] as stated.
>
> 3) the size field does not contain the size of the compressed data,
> but rather the number of sectors where that data is stored. The
> compressed data starts at the exact point specified in the offset
> field and ends when there's enough data to produce a cluster of
> decompressed data. Both points can be in the middle of a sector,
> allowing several compressed clusters to be stored next to one
> another, sharing sectors if necessary.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
Thanks, applied to the block branch.
Kevin
next prev parent reply other threads:[~2018-02-21 17:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 14:08 [Qemu-devel] [PATCH v3] specs/qcow2: Fix documentation of the compressed cluster descriptor Alberto Garcia
2018-02-21 16:10 ` Eric Blake
2018-02-21 16:15 ` Alberto Garcia
2018-02-21 16:12 ` Eric Blake
2018-02-21 17:08 ` Kevin Wolf [this message]
2018-02-21 22:10 ` Eric Blake
2018-02-22 10:01 ` Alberto Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180221170835.GA353@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.