qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_al


From: Alberto Garcia
Subject: Re: [Qemu-devel] [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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]