On Wed, May 20, 2020 at 05:49:01PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We have a few bdrv_*() functions that can either spawn a new coroutine > and wait for it with BDRV_POLL_WHILE() or use a fastpath if they are > alreeady running in a coroutine. All of them duplicate basically the > same code. > > Factor the common code into a new function bdrv_run_co(). > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > [Factor out bdrv_run_co_entry too] > --- > > v3: keep created coroutine in BdrvRunCo struct for debugging [Kevin] > > block/io.c | 193 ++++++++++++++++++++--------------------------------- > 1 file changed, 72 insertions(+), 121 deletions(-)
Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan
signature.asc
Description: PGP signature