[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_al
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_all |
Date: |
Tue, 7 Apr 2015 15:59:29 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Fri, Apr 03, 2015 at 10:05:19PM +0800, Fam Zheng wrote:
> + QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
> + AioContext *aio_context = bdrv_get_aio_context(bs);
> +
> + aio_context_acquire(aio_context);
> + if (bs->job) {
> + block_job_pause(bs->job);
> + }
> + aio_context_release(aio_context);
> + }
Not directly a problem in your code, but since I'm playing with the
idea of allowing block jobs to reside in any arbitrary node we'll have
to figure out a simple and global way to iterate over all block jobs.
The one that I wrote is probably not the best one. Maybe we can have
block_job_create/completed() maintain a list of jobs instead.
https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg04800.html
But anyway I don't think it's something for this patchset, therefore:
Reviewed-by: Alberto Garcia <address@hidden>
Berto
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/4] qemu-iotests: Test that "stop" doesn't drain block jobs, (continued)
[Qemu-block] [PATCH v2 4/4] blockjob: Update function name in comments, Fam Zheng, 2015/04/03
[Qemu-block] [PATCH v2 1/4] blockjob: Allow nested pause, Fam Zheng, 2015/04/03
[Qemu-block] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_all, Fam Zheng, 2015/04/03
Re: [Qemu-block] [PATCH v2 0/4] Fix "stop" draining block jobs, Stefan Hajnoczi, 2015/04/08
Re: [Qemu-block] [PATCH v2 0/4] Fix "stop" draining block jobs, Stefan Hajnoczi, 2015/04/20