[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v10 01/16] block: Pause all jobs during bdrv_reo
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH v10 01/16] block: Pause all jobs during bdrv_reopen_multiple() |
Date: |
Mon, 10 Oct 2016 18:41:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/10/2016 17:37, Kevin Wolf wrote:
> > + while ((job = block_job_next(job))) {
> > + AioContext *aio_context = blk_get_aio_context(job->blk);
> > +
> > + aio_context_acquire(aio_context);
> > + block_job_pause(job);
> > + aio_context_release(aio_context);
> > + }
> > +
> > bdrv_drain_all();
>
> We already have a bdrv_drain_all() here, which does the same thing (and
> more) internally, except that it resumes all jobs before it returns.
> Maybe what we should do is split bdrv_drain_all() in a begin/end pair,
> too.
Hey, haven't I just suggested the same? :) I swear I hadn't read this
before.
> The other point I'm wondering now is whether bdrv_drain_all() should
> have the aio_disable/enable_external() pair that bdrv_drain() has.
bdrv_drain_all need not have it, but its start/end replacement should.
Paolo
- Re: [Qemu-block] [PATCH v10 04/16] block: Use block_job_add_bdrv() in backup_start(), (continued)
- [Qemu-block] [PATCH v10 05/16] block: Check blockers in all nodes involved in a block-commit job, Alberto Garcia, 2016/10/06
- [Qemu-block] [PATCH v10 10/16] docs: Document how to stream to an intermediate layer, Alberto Garcia, 2016/10/06
- [Qemu-block] [PATCH v10 14/16] qemu-iotests: Test block-stream and block-commit in parallel, Alberto Garcia, 2016/10/06
- [Qemu-block] [PATCH v10 16/16] qemu-iotests: Test streaming to a Quorum child, Alberto Garcia, 2016/10/06
- [Qemu-block] [PATCH v10 13/16] qemu-iotests: Test overlapping stream and commit operations, Alberto Garcia, 2016/10/06
- [Qemu-block] [PATCH v10 01/16] block: Pause all jobs during bdrv_reopen_multiple(), Alberto Garcia, 2016/10/06
[Qemu-block] [PATCH v10 07/16] block: Block all intermediate nodes in commit_active_start(), Alberto Garcia, 2016/10/06
[Qemu-block] [PATCH v10 15/16] qemu-iotests: Add iotests.supports_quorum(), Alberto Garcia, 2016/10/06
[Qemu-block] [PATCH v10 12/16] qemu-iotests: Test block-stream operations in parallel, Alberto Garcia, 2016/10/06
[Qemu-block] [PATCH v10 11/16] qemu-iotests: Test streaming to an intermediate layer, Alberto Garcia, 2016/10/06