• Fam Zheng's avatar
    block: per caller dirty bitmap · e4654d2d
    Fam Zheng authored
    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:
    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_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: default avatarFam Zheng <famz@redhat.com>
    Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
block-migration.c 22.8 KB