qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] block: per caller dirty bitmap
Date: Mon, 11 Nov 2013 11:35:02 +0100	[thread overview]
Message-ID: <20131111103502.GK28264@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1383557410-18062-1-git-send-email-famz@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 <famz@redhat.com>
> 
> ---
> v2: Added BdrvDirtyBitmap [Paolo]
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  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 <stefanha@redhat.com>

  parent reply	other threads:[~2013-11-11 10:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04  9:30 [Qemu-devel] [PATCH v2] block: per caller dirty bitmap Fam Zheng
2013-11-04 10:37 ` Paolo Bonzini
2013-11-04 10:47   ` Fam Zheng
2013-11-04 10:55     ` Paolo Bonzini
2013-11-11 10:31       ` Stefan Hajnoczi
2013-11-04 14:38 ` Benoît Canet
2013-11-05  3:12   ` Fam Zheng
2013-11-11 10:34 ` Stefan Hajnoczi
2013-11-11 10:35 ` Stefan Hajnoczi [this message]
2013-11-12 10:46 ` Kevin Wolf
2013-11-12 13:06   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131111103502.GK28264@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).