qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH 02/17] mirror: Make wait_for_any_op


From: Max Reitz
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 02/17] mirror: Make wait_for_any_operation() coroutine_fn
Date: Mon, 13 Aug 2018 17:20:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-08-13 14:54, Murilo Opsfelder Araujo wrote:
> Hi, Max.

Hi, Murilo!

> On Mon, Aug 13, 2018 at 04:19:51AM +0200, Max Reitz wrote:
>> mirror_wait_for_any_operation() calls qemu_co_queue_wait(), which is a
>> coroutine_fn (technically it is a macro which resolves to a
>> coroutine_fn).  Therefore, this function needs to be a coroutine_fn as
>> well.
>>
>> This patch makes it and all of its callers coroutine_fns.
>>
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>>  block/mirror.c | 30 ++++++++++++++++--------------
>>  1 file changed, 16 insertions(+), 14 deletions(-)
>>
>> diff --git a/block/mirror.c b/block/mirror.c
>> index 85f5742eae..c28b6159d5 100644
>> --- a/block/mirror.c
>> +++ b/block/mirror.c

[...]

>> @@ -1098,11 +1100,11 @@ static void mirror_complete(Job *job, Error **errp)
>>      job_enter(job);
>>  }
>>
>> -static void mirror_pause(Job *job)
>> +static void coroutine_fn mirror_pause(Job *job)
> 
> Other functions in this patch were renamed to mirror_co_*.  I'm not sure if
> mirror_pause() should follow that, i.e. be renamed to mirror_co_pause().

Hm.  I don't know why I didn't do that.  Makes sense, why not.

(Well, JobDriver.pause() is not called .co_pause(), but then again,
JobDriver.start is set to mirror_run(), so it's not like our function
names match so far...)

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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