On Fri 26 Jan 2018 08:46:19 PM CET, Eric Blake wrote:
>> -                ret = qcow2_cache_get(bs, s->l2_table_cache, l2_offset,
>> -                                      (void **)&l2_table);
>> +                ret = qcow2_cache_get(bs, s->l2_table_cache, slice_offset,
>> +                                      (void **)&l2_slice);
>
> The (void **) cast is probably still necessary (anything can go to
> void*, but C gets pickier when going to void**), but...
>
>>              } else {
>>                  /* load inactive L2 tables from disk */
>> -                ret = bdrv_read(bs->file, l2_offset / BDRV_SECTOR_SIZE,
>> -                                (void *)l2_table, s->cluster_sectors);
>> +                ret = bdrv_pread(bs->file, slice_offset,
>> +                                 (void *)l2_slice, slice_size2);
>
> ...do we still need this cast to void*?
>
>
>>  
>> -                    ret = bdrv_write(bs->file, l2_offset / BDRV_SECTOR_SIZE,
>> -                                     (void *)l2_table, s->cluster_sectors);
>> +                    ret = bdrv_pwrite(bs->file, slice_offset,
>> +                                      (void *)l2_slice, slice_size2);
>
> and again here

Good idea, I'll remove the void * casts.

Berto

Reply via email to