From: Alberto Garcia <berto@igalia.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
pbonzini@redhat.com
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 [thread overview]
Message-ID: <20150407135929.GA1655@igalia.com> (raw)
In-Reply-To: <1428069921-2957-3-git-send-email-famz@redhat.com>
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 <berto@igalia.com>
Berto
next prev parent reply other threads:[~2015-04-07 13:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 14:05 [Qemu-devel] [PATCH v2 0/4] Fix "stop" draining block jobs Fam Zheng
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 1/4] blockjob: Allow nested pause Fam Zheng
2015-04-03 14:13 ` Paolo Bonzini
2015-04-20 17:11 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-08 7:25 ` [Qemu-devel] " Alberto Garcia
2015-04-08 10:31 ` Stefan Hajnoczi
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_all Fam Zheng
2015-04-07 13:59 ` Alberto Garcia [this message]
2015-04-08 10:37 ` Stefan Hajnoczi
2015-04-08 14:56 ` Alberto Garcia
2015-04-09 10:34 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 3/4] qemu-iotests: Test that "stop" doesn't drain block jobs Fam Zheng
2015-04-07 14:46 ` Alberto Garcia
2015-04-08 10:39 ` Stefan Hajnoczi
2015-04-24 15:43 ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-27 5:14 ` Fam Zheng
2015-04-27 11:08 ` Max Reitz
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 4/4] blockjob: Update function name in comments Fam Zheng
2015-04-07 14:46 ` Alberto Garcia
2015-04-08 10:40 ` [Qemu-devel] [PATCH v2 0/4] Fix "stop" draining block jobs Stefan Hajnoczi
2015-04-20 15:38 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150407135929.GA1655@igalia.com \
--to=berto@igalia.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.