]> Git Repo - qemu.git/commitdiff
block: Assert that bdrv_release_dirty_bitmap succeeded
authorFam Zheng <[email protected]>
Thu, 13 Oct 2016 21:58:26 +0000 (17:58 -0400)
committerMax Reitz <[email protected]>
Mon, 24 Oct 2016 15:56:07 +0000 (17:56 +0200)
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 <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: John Snow <[email protected]>
Message-id: 1476395910[email protected]
Signed-off-by: Max Reitz <[email protected]>
block/dirty-bitmap.c

index 860acc9b5b2128595e5b4bf4e3dc39b83f0e8aea..31d5296ef753297281be11248e5c975f05cfad8f 100644 (file)
@@ -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)
This page took 0.026611 seconds and 4 git commands to generate.