From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Liu Ping Fan <pingfank@linux.vnet.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [RFC 00/13] aio: drop io_flush()
Date: Fri, 12 Apr 2013 15:41:05 +0200 [thread overview]
Message-ID: <CAJSP0QXR_nFJe6__cDcDkPutyB9-8VbzG9SULgcSmHzzy+7_+A@mail.gmail.com> (raw)
In-Reply-To: <20130412122208.GE3426@dhcp-200-207.str.redhat.com>
On Fri, Apr 12, 2013 at 2:22 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> Am 12.04.2013 um 14:06 hat Stefan Hajnoczi geschrieben:
>> On Fri, Apr 12, 2013 at 12:27 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> > Il 12/04/2013 12:04, Kevin Wolf ha scritto:
>> >> Or actually, if you want to avoid .bdrv_drain for now, the patch that I
>> >> started when I thought a bit about this, had a default .bdrv_drain
>> >> implementation that just forwarded the request to bs->file if it wasn't
>> >> implemented by a block driver. For the QED case, this would work.
>> >
>> > It's similar to bdrv_co_flush. Drain bs first, then bs->backing_hd
>> > (this is not needed in bdrv_co_flush), then bs->file, then the driver
>> > can do it on other files.
>>
>> Thanks for explaining Kevin. I didn't check whether bdrv_states
>> included all BlockDriverStates.
>>
>> The simplest solution is to put all BlockDriverStates on a global list.
>>
>> A .bdrv_drain() interface is more flexible but I don't see a need for it yet.
>
> We don't need the .bdrv_drain() callback yet, but please implement it
> without a global list and with a function that forwards requests to
> bs->file and bs->backing_hd like Paolo suggested. This will be the
> obvious place to add the .bdrv_drain() callback later.
>
> The reason why I prefer this approach is that it allows draining a
> single BlockDriverState. After your patches we're really close to
> enabling this and converting some bdrv_drain_all() to more specific
> bdrv_drain(bs) calls.
Fair enough, that approach does make it possible to drain single
devices in the future.
Stefan
prev parent reply other threads:[~2013-04-12 13:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 15:44 [Qemu-devel] [RFC 00/13] aio: drop io_flush() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 01/13] block: stop relying on io_flush() in bdrv_drain_all() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 02/13] dataplane/virtio-blk: check exit conditions before aio_poll() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 03/13] aio: stop using .io_flush() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 04/13] block/curl: drop curl_aio_flush() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 05/13] block/gluster: drop qemu_gluster_aio_flush_cb() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 06/13] block/iscsi: drop iscsi_process_flush() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 07/13] block/linux-aio: drop qemu_laio_completion_cb() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 08/13] block/nbd: drop nbd_have_request() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 09/13] block/rbd: drop qemu_rbd_aio_flush_cb() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 10/13] block/sheepdog: drop have_co_req() and aio_flush_request() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 11/13] dataplane/virtio-blk: drop flush_true() and flush_io() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 12/13] thread-pool: drop thread_pool_active() Stefan Hajnoczi
2013-04-11 15:44 ` [Qemu-devel] [RFC 13/13] aio: drop io_flush argument Stefan Hajnoczi
2013-04-12 8:02 ` [Qemu-devel] [RFC 00/13] aio: drop io_flush() Kevin Wolf
2013-04-12 9:49 ` Stefan Hajnoczi
2013-04-12 10:04 ` Kevin Wolf
2013-04-12 10:27 ` Paolo Bonzini
2013-04-12 12:06 ` Stefan Hajnoczi
2013-04-12 12:22 ` Kevin Wolf
2013-04-12 13:41 ` Stefan Hajnoczi [this message]
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=CAJSP0QXR_nFJe6__cDcDkPutyB9-8VbzG9SULgcSmHzzy+7_+A@mail.gmail.com \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pingfank@linux.vnet.ibm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).