Skip to content
  • Vladimir Sementsov-Ogievskiy's avatar
    c4237dfa
    block: fix spoiling all dirty bitmaps by mirror and migration · c4237dfa
    Vladimir Sementsov-Ogievskiy authored
    
    
    Mirror and migration use dirty bitmaps for their purposes, and since
    commit [block: per caller dirty bitmap] they use their own bitmaps, not
    the global one. But they use old functions bdrv_set_dirty and
    bdrv_reset_dirty, which change all dirty bitmaps.
    
    Named dirty bitmaps series by Fam and Snow are affected: mirroring and
    migration will spoil all (not related to this mirroring or migration)
    named dirty bitmaps.
    
    This patch fixes this by adding bdrv_set_dirty_bitmap and
    bdrv_reset_dirty_bitmap, which change concrete bitmap. Also, to prevent
    such mistakes in future, old functions bdrv_(set,reset)_dirty are made
    static, for internal block usage.
    
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@parallels.com>
    CC: John Snow <jsnow@redhat.com>
    CC: Fam Zheng <famz@redhat.com>
    CC: Denis V. Lunev <den@openvz.org>
    CC: Stefan Hajnoczi <stefanha@redhat.com>
    CC: Kevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    Message-id: 1417081246-3593-1-git-send-email-vsementsov@parallels.com
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    c4237dfa
    block: fix spoiling all dirty bitmaps by mirror and migration
    Vladimir Sementsov-Ogievskiy authored
    
    
    Mirror and migration use dirty bitmaps for their purposes, and since
    commit [block: per caller dirty bitmap] they use their own bitmaps, not
    the global one. But they use old functions bdrv_set_dirty and
    bdrv_reset_dirty, which change all dirty bitmaps.
    
    Named dirty bitmaps series by Fam and Snow are affected: mirroring and
    migration will spoil all (not related to this mirroring or migration)
    named dirty bitmaps.
    
    This patch fixes this by adding bdrv_set_dirty_bitmap and
    bdrv_reset_dirty_bitmap, which change concrete bitmap. Also, to prevent
    such mistakes in future, old functions bdrv_(set,reset)_dirty are made
    static, for internal block usage.
    
    Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@parallels.com>
    CC: John Snow <jsnow@redhat.com>
    CC: Fam Zheng <famz@redhat.com>
    CC: Denis V. Lunev <den@openvz.org>
    CC: Stefan Hajnoczi <stefanha@redhat.com>
    CC: Kevin Wolf <kwolf@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
    Reviewed-by: default avatarFam Zheng <famz@redhat.com>
    Message-id: 1417081246-3593-1-git-send-email-vsementsov@parallels.com
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Loading