From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UctHp-00018s-KH for qemu-devel@nongnu.org; Thu, 16 May 2013 04:11:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UctHm-0001A9-Tl for qemu-devel@nongnu.org; Thu, 16 May 2013 04:11:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UctHm-00019z-Ls for qemu-devel@nongnu.org; Thu, 16 May 2013 04:11:38 -0400 Date: Thu, 16 May 2013 10:11:33 +0200 From: Stefan Hajnoczi Message-ID: <20130516081133.GG1597@stefanha-thinkpad.redhat.com> References: <1368628476-19622-1-git-send-email-stefanha@redhat.com> <1368628476-19622-2-git-send-email-stefanha@redhat.com> <51939EF1.6050800@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51939EF1.6050800@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 1/8] block: add bdrv_add_before_write_cb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, xiawenc@linux.vnet.ibm.com, imain@redhat.com, dietmar@proxmox.com On Wed, May 15, 2013 at 04:42:57PM +0200, Paolo Bonzini wrote: > Il 15/05/2013 16:34, Stefan Hajnoczi ha scritto: > > The bdrv_add_before_write_cb() function installs a callback that is > > invoked before a write request is processed. This will be used to > > implement copy-on-write point-in-time snapshots where we need to copy > > out old data before overwriting it. > > Perhaps a notifier list that receives the BdrvTrackedRequest? (BTW we > should probably remove all the notifier_remove wrappers, they're useless). Nice idea, done in v4. I originally rejected NotifierList because it only has a void * argument, but BdrvRequest has the information we need.