qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 30/39] qcow2: Update expand_zero_clusters_in_


From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH v3 30/39] qcow2: Update expand_zero_clusters_in_l1() to support L2 slices
Date: Mon, 29 Jan 2018 13:06:16 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

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

[Prev in Thread] Current Thread [Next in Thread]