[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V6 31/33] qcow: Set large dedup hash block size.
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC V6 31/33] qcow: Set large dedup hash block size. |
Date: |
Thu, 28 Feb 2013 10:47:27 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Feb 27, 2013 at 03:53:43PM +0100, Benoît Canet wrote:
> > > inc_refcounts(bs, res, refcount_table, refcount_table_size,
> > > - l2_offset, s->cluster_size);
> > > + l2_offset, dedup ? s->hash_block_size : s->l2_size << 3);
> >
> > Why s->l2_size << 3 instead of s->cluster_size for the non-dedup case?
>
> I wrote it like this so the code would work fine is l2_size is different of
> cluster size. It is almost a bugfix.
I see. Please use s->l2_size * sizeof(uint64_t) to make the expression
clear - this is what the rest of the code uses to calculate the L2 table
size in bytes.
Stefan