summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-11-30 18:21:20 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 10:48:52 -0600
commitc6d2283068026035a6468aae9dcde953bd7521ac (patch)
treedb0eef6fb2a061b09f7804239a8260e6b45b2df2 /block_int.h
parentblock migration: Rework constants API (diff)
downloadqemu-kvm-c6d2283068026035a6468aae9dcde953bd7521ac.tar.gz
qemu-kvm-c6d2283068026035a6468aae9dcde953bd7521ac.tar.bz2
qemu-kvm-c6d2283068026035a6468aae9dcde953bd7521ac.zip
block migration: Cleanup dirty tracking code
This switches the dirty bitmap to a true bitmap, reducing its footprint (specifically in caches). It moreover fixes off-by-one bugs in set_dirty_bitmap (nb_sectors+1 were marked) and bdrv_get_dirty (limit check allowed one sector behind end of drive). And is drops redundant dirty_tracking field from BlockDriverState. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/block_int.h b/block_int.h
index 7ebe926f5..907e86410 100644
--- a/block_int.h
+++ b/block_int.h
@@ -168,8 +168,7 @@ struct BlockDriverState {
int cyls, heads, secs, translation;
int type;
char device_name[32];
- int dirty_tracking;
- uint8_t *dirty_bitmap;
+ unsigned long *dirty_bitmap;
BlockDriverState *next;
void *private;
};