On Wed 06 May 2015 05:00:50 PM CEST, Stefan Hajnoczi wrote:
>> >> int qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table)
>> >> {
>> >> -int i;
>> >> +int i = (*table - c->table_array) / c->table_size;
>> >>
>> >> -for (i = 0; i < c->size; i++) {
>> >> -if (t
On Tue, May 05, 2015 at 03:06:52PM +0200, Alberto Garcia wrote:
> On Fri 01 May 2015 04:31:52 PM CEST, Stefan Hajnoczi wrote:
>
> >> int qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table)
> >> {
> >> -int i;
> >> +int i = (*table - c->table_array) / c->table_size;
> >>
On 04/30/2015 04:11 AM, Alberto Garcia wrote:
> Since all tables are now stored together, it is possible to obtain
> the position of a particular table directly from its address, so the
> operation becomes O(1).
>
> Signed-off-by: Alberto Garcia
> ---
> block/qcow2-cache.c | 22 +
On Fri 01 May 2015 04:31:52 PM CEST, Stefan Hajnoczi wrote:
>> int qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table)
>> {
>> -int i;
>> +int i = (*table - c->table_array) / c->table_size;
>>
>> -for (i = 0; i < c->size; i++) {
>> -if (table_addr(c, i) == *t
On Thu, Apr 30, 2015 at 01:11:41PM +0300, Alberto Garcia wrote:
> int qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table)
> {
> -int i;
> +int i = (*table - c->table_array) / c->table_size;
>
> -for (i = 0; i < c->size; i++) {
> -if (table_addr(c, i) == *table