mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
qmp: add x-debug-block-dirty-bitmap-sha256
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20170628120530.31251-26-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
eb738bb50f
commit
a3b52535e8
7 changed files with 78 additions and 1 deletions
25
blockdev.c
25
blockdev.c
|
|
@ -2820,6 +2820,31 @@ void qmp_block_dirty_bitmap_clear(const char *node, const char *name,
|
|||
bdrv_clear_dirty_bitmap(bitmap, NULL);
|
||||
}
|
||||
|
||||
BlockDirtyBitmapSha256 *qmp_x_debug_block_dirty_bitmap_sha256(const char *node,
|
||||
const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
BdrvDirtyBitmap *bitmap;
|
||||
BlockDriverState *bs;
|
||||
BlockDirtyBitmapSha256 *ret = NULL;
|
||||
char *sha256;
|
||||
|
||||
bitmap = block_dirty_bitmap_lookup(node, name, &bs, errp);
|
||||
if (!bitmap || !bs) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sha256 = bdrv_dirty_bitmap_sha256(bitmap, errp);
|
||||
if (sha256 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = g_new(BlockDirtyBitmapSha256, 1);
|
||||
ret->sha256 = sha256;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void hmp_drive_del(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
const char *id = qdict_get_str(qdict, "id");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue