qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] block: per caller dirty bitmap
@ 2013-10-30  7:08 Fam Zheng
  2013-10-30  7:08 ` [Qemu-devel] [PATCH 1/3] HBitmap: move struct HBitmap to header Fam Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Fam Zheng @ 2013-10-30  7:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha

Previously a BlockDriverState has only one dirty bitmap (bs->dirty_bitmap),
consequently only one caller can keep track of writings with it. This limit is
removed by this series. This is useful for implementing features like
incremental backup, which may require multiple dirty bitmap callers for one BDS.

The bs->dirty_bitmap is changed to QLIST of HBitmap as bs->dirty_bitmaps, while
still maintained by block.c. The caller calls bdrv_create_dirty_bitmap() to
allocate a dirty bitmap and releases it after use by
bdrv_release_dirty_bitmap(). Block.c automatically sets dirty bits just like
existing code, but to all the dirty bitmaps in the BDS. That way the caller
doesn't need to register a callback and update dirty bit explicitly.

Fam Zheng (3):
  HBitmap: move struct HBitmap to header
  HBitmap: add QLIST_ENTRY to HBitmap
  block: per caller dirty bitmap

 block-migration.c         | 22 ++++++++++----
 block.c                   | 74 ++++++++++++++++++++++++++---------------------
 block/mirror.c            | 23 ++++++++-------
 block/qapi.c              |  8 -----
 include/block/block.h     | 11 ++++---
 include/block/block_int.h |  2 +-
 include/qemu/hbitmap.h    | 42 +++++++++++++++++++++++++++
 util/hbitmap.c            | 38 ------------------------
 8 files changed, 120 insertions(+), 100 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-04 10:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  7:08 [Qemu-devel] [PATCH 0/3] block: per caller dirty bitmap Fam Zheng
2013-10-30  7:08 ` [Qemu-devel] [PATCH 1/3] HBitmap: move struct HBitmap to header Fam Zheng
2013-10-30  7:08 ` [Qemu-devel] [PATCH 2/3] HBitmap: add QLIST_ENTRY to HBitmap Fam Zheng
2013-10-30  7:49   ` Paolo Bonzini
2013-10-30  7:08 ` [Qemu-devel] [PATCH 3/3] block: per caller dirty bitmap Fam Zheng
2013-10-30  7:26   ` Fam Zheng
2013-10-30  7:49   ` Paolo Bonzini
2013-11-04  6:59     ` Fam Zheng
2013-11-04 10:34       ` Paolo Bonzini

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).