qemu-block
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v3 12/27] qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCL


From: Alberto Garcia
Subject: Re: [RFC PATCH v3 12/27] qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*
Date: Fri, 21 Feb 2020 16:14:24 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Fri 21 Feb 2020 12:35:55 PM CET, Max Reitz wrote:
>> @@ -2223,22 +2227,23 @@ static coroutine_fn int 
>> qcow2_co_preadv_part(BlockDriverState *bs,
>>          }
>>  
>>          qemu_co_mutex_lock(&s->lock);
>> -        ret = qcow2_get_cluster_offset(bs, offset, &cur_bytes, 
>> &cluster_offset);
>> +        ret = qcow2_get_cluster_offset(bs, offset, &cur_bytes,
>> +                                       &cluster_offset, &type);
>
> I wonder whether this is kind of a bug fix here.  It’s entirely possible
> that @ret isn’t set after this, and then we get to the “out” label,
> which has a check on “if (ret == 0)”.

I think that in order to get to "if (ret == 0)" you would first need to
run aio_task_pool_new(), and that codepath guarantees that @ret is set.

Berto



reply via email to

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