[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qcow2: use one single memory b
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables |
Date: |
Tue, 05 May 2015 17:09:05 +0200 |
User-agent: |
Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) |
On Tue 05 May 2015 01:20:19 PM CEST, Kevin Wolf wrote:
> Though looking at the code again I see now that c->table_size isn't
> consistently used. The I/O requests still use s->cluster_size. We
> should either use it everywhere or not introduce it at all.
c->table_size is necessary in order to calculate the offset of a
particular table, because s->cluster_size is not always available
(e.g. qcow2_cache_entry_mark_dirty()). We could make it a requirement of
the API, though.
Alternatively we could have c->bs instead of c->table_size. That would
spare us from passing the BlockDriverState pointer to all qcow2_cache_
functions.
The assumption would be that the BlockDriverState pointer is the same
for the whole lifetime of the cache, but that's always guaranteed to be
like that, right?
Berto