qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v3] block: Factor out bdrv_run_co()


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3] block: Factor out bdrv_run_co()
Date: Thu, 18 Jun 2020 10:49:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

17.06.2020 16:46, Stefan Hajnoczi wrote:
On Thu, May 28, 2020 at 08:38:04PM +0300, Vladimir Sementsov-Ogievskiy wrote:
28.05.2020 18:17, Stefan Hajnoczi wrote:
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 <kwolf@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@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


Actually, [PATCH v5 0/7] coroutines: generate wrapper code
substites this patch.. What do you think of it, could we take it instead?

This patch has already been merged but the "coroutines: generate wrapper
code" series can be reviewed and merged separately.


Yes, thanks. "[PATCH v7 0/7] coroutines: generate wrapper code" is already 
based on master with bdrv_run_co().


--
Best regards,
Vladimir



reply via email to

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