From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsAW5-0006eC-5v for qemu-devel@nongnu.org; Wed, 04 Jun 2014 08:42:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsAVw-00073b-51 for qemu-devel@nongnu.org; Wed, 04 Jun 2014 08:42:05 -0400 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:41958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsAVv-00073U-Uk for qemu-devel@nongnu.org; Wed, 04 Jun 2014 08:41:56 -0400 Received: by mail-wi0-f178.google.com with SMTP id cc10so1365432wib.11 for ; Wed, 04 Jun 2014 05:41:53 -0700 (PDT) Date: Wed, 4 Jun 2014 14:41:48 +0200 From: Stefan Hajnoczi Message-ID: <20140604124148.GE11073@stefanha-thinkpad.redhat.com> References: <1401561792-13410-1-git-send-email-mreitz@redhat.com> <1401561792-13410-5-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1401561792-13410-5-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [RFC 4/5] block: Add AIO followers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Paolo Bonzini , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi 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(). Stefan