Re: [Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-09-02 Thread Eric Blake
On 09/02/2014 12:59 PM, Max Reitz wrote: >> Consider refcount_order == 0 (that is, no shared blocks, ALL blocks have >> at most refcount 1). Then, refcount_bits is (1 << 0) == 1. But 1/8 in >> integer math truncates to 0 (oops, division by zero is undefined); when >> in reality, the expression y

Re: [Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-09-02 Thread Max Reitz
On 30.08.2014 00:37, Eric Blake wrote: On 08/29/2014 03:45 PM, Max Reitz wrote: A refblock entry may have a different size than 16 bits, it may even be smaller than a byte. Correct the refcount_block_entries calculation accordingly. Signed-off-by: Max Reitz --- docs/specs/qcow2.txt | 2 +-

Re: [Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-09-01 Thread Benoît Canet
The Friday 29 Aug 2014 à 23:45:27 (+0200), Max Reitz wrote : > A refblock entry may have a different size than 16 bits, it may even be > smaller than a byte. Correct the refcount_block_entries calculation Now if the refblock entry size is smaller than a byte > accordingly. > > Signed-off-by: Max

Re: [Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-08-29 Thread Eric Blake
On 08/29/2014 03:45 PM, Max Reitz wrote: > A refblock entry may have a different size than 16 bits, it may even be > smaller than a byte. Correct the refcount_block_entries calculation > accordingly. > > Signed-off-by: Max Reitz > --- > docs/specs/qcow2.txt | 2 +- > 1 file changed, 1 insertion(

[Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-08-29 Thread Max Reitz
A refblock entry may have a different size than 16 bits, it may even be smaller than a byte. Correct the refcount_block_entries calculation accordingly. Signed-off-by: Max Reitz --- docs/specs/qcow2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/qcow2.txt b/do