On Wed 22 Apr 2020 01:06:42 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
>> @@ -1897,7 +1897,7 @@ static int zero_in_l2_slice(BlockDriverState *bs, 
>> uint64_t offset,
>
> As I see, function is not prepared to handle unaligned offset. Worth
> add an assertion while being here?

The only caller already asserts that, and the length parameter is not
even the number of bytes but the number of clusters, so I don't think
it's so important in this case.

>>       for (i = 0; i < nb_clusters; i++) {
>> -        uint64_t old_offset;
>> +        uint64_t old_offset, l2_entry = 0;
>
> I'd rename s/old_offset/old_l2_entry

I think we can get rid of old_offset altogether. I'll think of a way to
restructure the logics along the lines that you suggest.

Thanks!

Berto

Reply via email to