[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/17] mirror: Make wait_for_any_operation() cor
From: |
Max Reitz |
Subject: |
Re: [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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/17] mirror: Mainly coroutine refinements, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 01/17] iotests: Try reading while mirroring in 156, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 02/17] mirror: Make wait_for_any_operation() coroutine_fn, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 03/17] mirror: Pull *_align_for_copy() from *_co_read(), Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 04/17] mirror: Remove bytes_handled, part 1, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 06/17] mirror: Create mirror_co_perform(), Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 05/17] mirror: Remove bytes_handled, part 2, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 07/17] mirror: Make mirror_co_zero() nicer, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 08/17] mirror: Make mirror_co_discard() nicer, Max Reitz, 2018/08/12
- [Qemu-devel] [PATCH 09/17] mirror: Lock AioContext in mirror_co_perform(), Max Reitz, 2018/08/12