diff options
| author | Paolo Bonzini | 2012-08-01 15:23:44 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2012-10-24 10:26:19 +0200 |
| commit | b9a9b3a4626aa099f829e2a6036bfaa0c8e47700 (patch) | |
| tree | f36184a6c253e8a874f830b52a5a3852a8672f7e /block.c | |
| parent | block: introduce new dirty bitmap functionality (diff) | |
| download | qemu-b9a9b3a4626aa099f829e2a6036bfaa0c8e47700.tar.gz qemu-b9a9b3a4626aa099f829e2a6036bfaa0c8e47700.tar.xz qemu-b9a9b3a4626aa099f829e2a6036bfaa0c8e47700.zip | |
block: export dirty bitmap information in query-block
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
| -rw-r--r-- | block.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2837,6 +2837,13 @@ BlockInfo *bdrv_query_info(BlockDriverState *bs) info->io_status = bs->iostatus; } + if (bs->dirty_bitmap) { + info->has_dirty = true; + info->dirty = g_malloc0(sizeof(*info->dirty)); + info->dirty->count = bdrv_get_dirty_count(bs) * + BDRV_SECTORS_PER_DIRTY_CHUNK * BDRV_SECTOR_SIZE; + } + if (bs->drv) { info->has_inserted = true; info->inserted = g_malloc0(sizeof(*info->inserted)); |
