[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/6] block: Quiesce old aio context during bd
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/6] block: Quiesce old aio context during bdrv_set_aio_context |
Date: |
Mon, 10 Apr 2017 16:45:51 +0800 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, 04/10 10:06, Kevin Wolf wrote:
> Am 08.04.2017 um 05:43 hat Fam Zheng geschrieben:
> > On Fri, 04/07 13:50, Stefan Hajnoczi wrote:
> > > On Fri, Apr 07, 2017 at 02:54:12PM +0800, Fam Zheng wrote:
> > > > @@ -4413,6 +4416,10 @@ void bdrv_set_aio_context(BlockDriverState *bs,
> > > > AioContext *new_context)
> > > > aio_context_acquire(new_context);
> > > > bdrv_attach_aio_context(bs, new_context);
> > > > aio_context_release(new_context);
> > > > + if (bs->job) {
> > > > + block_job_resume(bs->job);
> > > > + }
> > >
> > > Should this be called before aio_context_release(new_context)?
> >
> > Yes, and I'm going to replace it with bdrv_parent_drained_begin() as Kevin
> > suggested.
>
> I think at the moment bdrv_parent_drained_begin() can't replace it yet,
> but you need both.
I think we have it already, see 600ac6a0e (blockjob: add devops to blockjob
backends):
bdrv_parent_drained_begin
-> blk_root_drained_begin
-> block_job_drained_begin
-> block_job_pause
Fam
- [Qemu-devel] [PATCH v2 1/6] block: Fix unpaired aio_disable_external in external snapshot, (continued)
[Qemu-devel] [PATCH v2 5/6] coroutine: Explicitly specify AioContext when entering coroutine, Fam Zheng, 2017/04/07
[Qemu-devel] [PATCH v2 6/6] tests/block-job-txn: Don't start block job before adding to txn, Fam Zheng, 2017/04/07