Re: [PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-28 Thread Kevin Wolf
Am 28.09.2020 um 11:05 hat Stefan Hajnoczi geschrieben: > On Fri, Sep 25, 2020 at 06:07:50PM +0200, Kevin Wolf wrote: > > Am 15.09.2020 um 16:57 hat Stefan Hajnoczi geschrieben: > > > On Wed, Sep 09, 2020 at 05:11:49PM +0200, Kevin Wolf wrote: > > > > @@ -2456,8 +2456,7 @@ void qmp_block_resize(boo

Re: [PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-28 Thread Stefan Hajnoczi
On Fri, Sep 25, 2020 at 06:07:50PM +0200, Kevin Wolf wrote: > Am 15.09.2020 um 16:57 hat Stefan Hajnoczi geschrieben: > > On Wed, Sep 09, 2020 at 05:11:49PM +0200, Kevin Wolf wrote: > > > @@ -2456,8 +2456,7 @@ void qmp_block_resize(bool has_device, const char > > > *device, > > > return;

Re: [PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-25 Thread Kevin Wolf
Am 15.09.2020 um 16:57 hat Stefan Hajnoczi geschrieben: > On Wed, Sep 09, 2020 at 05:11:49PM +0200, Kevin Wolf wrote: > > @@ -2456,8 +2456,7 @@ void qmp_block_resize(bool has_device, const char > > *device, > > return; > > } > > > > -aio_context = bdrv_get_aio_context(bs); > >

Re: [PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-15 Thread Stefan Hajnoczi
On Wed, Sep 09, 2020 at 05:11:49PM +0200, Kevin Wolf wrote: > @@ -2456,8 +2456,7 @@ void qmp_block_resize(bool has_device, const char > *device, > return; > } > > -aio_context = bdrv_get_aio_context(bs); > -aio_context_acquire(aio_context); > +old_ctx = bdrv_co_move_to_

[PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-09 Thread Kevin Wolf
block_resize performs some I/O that could potentially take quite some time, so use it as an example for the new 'coroutine': true annotation in the QAPI schema. bdrv_truncate() requires that we're already in the right AioContext for the BlockDriverState if called in coroutine context. So instead o