aboutsummaryrefslogtreecommitdiff
path: root/block/dirty-bitmap.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-10-13 17:58:26 -0400
committerMax Reitz <mreitz@redhat.com>2016-10-24 17:56:07 +0200
commit7105007a5c8ae6228d78487e1e382d53863ab2c9 (patch)
tree6f4c902aa5ed27f0e78c4ffeeb4502697c9f275e /block/dirty-bitmap.c
parent15891fac7dd0300f94cca081cfef51b074cb988b (diff)
downloadqemu-7105007a5c8ae6228d78487e1e382d53863ab2c9.zip
qemu-7105007a5c8ae6228d78487e1e382d53863ab2c9.tar.gz
qemu-7105007a5c8ae6228d78487e1e382d53863ab2c9.tar.bz2
block: Assert that bdrv_release_dirty_bitmap succeeded
We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1476395910-8697-7-git-send-email-jsnow@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/dirty-bitmap.c')
-rw-r--r--block/dirty-bitmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 860acc9..31d5296 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -305,6 +305,9 @@ static void bdrv_do_release_matching_dirty_bitmap(BlockDriverState *bs,
}
}
}
+ if (bitmap) {
+ abort();
+ }
}
void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap)