[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines |
Date: |
Tue, 10 Oct 2017 11:14:20 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 13.09.2017 um 20:18 hat Max Reitz geschrieben:
> In order to talk to the source BDS (and maybe in the future to the
> target BDS as well) directly, we need to convert our existing AIO
> requests into coroutine I/O requests.
>
> Signed-off-by: Max Reitz <address@hidden>
Please follow through with it and add a few patches that turn it into
natural coroutine code rather than just any coroutine code. I know I did
the same kind of half-assed conversion in qed, but mirror is code that
is actually used and that people look at for more than just a bad
example.
You'll probably notice more things when you do this, but the obvious
things would be changing mirror_co_read() into a mirror_co_copy() with
the former callbacks inlined; keeping op on the stack instead of
mallocing it in mirror_perform() and free it deep inside the nested
functions that used to be callbacks; and probably also cleaning up the
random calls to aio_context_acquire/release() that will now appear in
the middle of the function.
Anyway, that's for follow-up patches (though ideally in the same
series), so for this one you can have:
Reviewed-by: Kevin Wolf <address@hidden>
- Re: [Qemu-block] [PATCH 05/18] block/mirror: Convert to coroutines,
Kevin Wolf <=