From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsbWE-0006uZ-BA for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsbW6-0005CN-Kc for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:32:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsbW6-0005Bz-Bx for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:31:54 -0400 Message-ID: <5390A982.6040106@redhat.com> Date: Thu, 05 Jun 2014 19:31:46 +0200 From: Max Reitz MIME-Version: 1.0 References: <1401561792-13410-1-git-send-email-mreitz@redhat.com> <1401561792-13410-5-git-send-email-mreitz@redhat.com> <20140604124148.GE11073@stefanha-thinkpad.redhat.com> In-Reply-To: <20140604124148.GE11073@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 4/5] block: Add AIO followers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Paolo Bonzini , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi On 04.06.2014 14:41, Stefan Hajnoczi wrote: > On Sat, May 31, 2014 at 08:43:11PM +0200, Max Reitz wrote: >> If a long-running operation on a BDS wants to always remain in the same >> AIO context, it somehow needs to keep track of the BDS changing its >> context. This adds a function for registering callbacks on a BDS which >> are called whenever the BDS is attached or detached from an AIO context. >> >> Signed-off-by: Max Reitz >> --- >> block.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ >> include/block/block_int.h | 40 ++++++++++++++++++++++++++++++++++ >> 2 files changed, 95 insertions(+) > Great, we definitely need this mechanism. Block jobs can also use it > later. > > Usually QEMU calls this a "notifier" rather than a "follower". For > example, see include/qemu/notifier.h and bdrv_add_close_notifier(). Ah, I see, thank you. Max > Stefan