From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxwHL-0007Ou-EZ for qemu-devel@nongnu.org; Thu, 28 May 2015 07:47:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxwHK-0003qE-Ly for qemu-devel@nongnu.org; Thu, 28 May 2015 07:47:15 -0400 Message-ID: <55670035.1080804@redhat.com> Date: Thu, 28 May 2015 13:47:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <55648220.1030206@redhat.com> <20150527090745.GA4669@noname.str.redhat.com> <55659372.9060804@redhat.com> <20150527101016.GB4669@noname.str.redhat.com> <55659FCC.2030704@redhat.com> <20150528024950.GC22609@dhcp-14-238.nay.redhat.com> <20150528094047.GB3385@noname.redhat.com> <20150528105538.GB8461@dhcp-14-238.nay.redhat.com> <5566F545.9070303@redhat.com> <20150528112439.GD3385@noname.redhat.com> <20150528114454.GE8461@dhcp-14-238.nay.redhat.com> In-Reply-To: <20150528114454.GE8461@dhcp-14-238.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , Kevin Wolf Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, jcody@redhat.com, armbru@redhat.com, Max Reitz , Stefan Hajnoczi , amit.shah@redhat.com On 28/05/2015 13:44, Fam Zheng wrote: > > The reason for doing it in the block layer is that it's in one place and > > we can be sure that it's applied. We can still in addition modify > > specific users to avoid even trying to send requests, but I think it's > > good to have the single place that always ensures correct functionality > > of the drain instead of making it dependent on the user. > > How to do that for the synchronous blk_write callers that don't run in > a coroutine? They would be completely oblivious to it. Their call to blk_co_write would queue the request. Then blk_write calls aio_poll, which ultimately would result in blk_resume and unqueue the request. Paolo