[PATCH v3] block: Factor out bdrv_run_co()

2020-05-20 Thread Vladimir Sementsov-Ogievskiy
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: Kevi

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

2020-05-28 Thread Stefan Hajnoczi
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

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

2020-05-28 Thread Vladimir Sementsov-Ogievskiy
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

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

2020-06-17 Thread Stefan Hajnoczi
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

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

2020-06-18 Thread Vladimir Sementsov-Ogievskiy
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