From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfopu-0005kb-Pg for qemu-devel@nongnu.org; Mon, 11 Nov 2013 05:35:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vfopm-0007YV-8Z for qemu-devel@nongnu.org; Mon, 11 Nov 2013 05:35:14 -0500 Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:37173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfopm-0007X0-1n for qemu-devel@nongnu.org; Mon, 11 Nov 2013 05:35:06 -0500 Received: by mail-ee0-f54.google.com with SMTP id c50so2363569eek.27 for ; Mon, 11 Nov 2013 02:35:05 -0800 (PST) Date: Mon, 11 Nov 2013 11:35:02 +0100 From: Stefan Hajnoczi Message-ID: <20131111103502.GK28264@stefanha-thinkpad.redhat.com> References: <1383557410-18062-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383557410-18062-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, Nov 04, 2013 at 05:30:10PM +0800, Fam Zheng wrote: > Previously a BlockDriverState has only one dirty bitmap, so only one > caller (e.g. a block job) can keep track of writing. This changes the > dirty bitmap to a list and creates a BdrvDirtyBitmap for each caller, the > lifecycle is managed with these new functions: > > bdrv_create_dirty_bitmap > bdrv_release_dirty_bitmap > > Where BdrvDirtyBitmap is a linked list wrapper structure of HBitmap. > > In place of bdrv_set_dirty_tracking, a BdrvDirtyBitmap pointer argument > is added to these functions, since each caller has its own dirty bitmap: > > bdrv_get_dirty > bdrv_dirty_iter_init > bdrv_get_dirty_count > > bdrv_set_dirty and bdrv_reset_dirty prototypes are unchanged but will > internally walk the list of all dirty bitmaps and set them one by one. > > Signed-off-by: Fam Zheng > > --- > v2: Added BdrvDirtyBitmap [Paolo] > > Signed-off-by: Fam Zheng > --- > block-migration.c | 22 +++++++++---- > block.c | 81 ++++++++++++++++++++++++++++------------------- > block/mirror.c | 23 ++++++++------ > block/qapi.c | 8 ----- > include/block/block.h | 11 ++++--- > include/block/block_int.h | 2 +- > 6 files changed, 85 insertions(+), 62 deletions(-) Happy with this modulo the indentation fixup I commented on. Reviewed-by: Stefan Hajnoczi