]> Git Repo - qemu.git/commit
qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove
authorJohn Snow <[email protected]>
Fri, 17 Apr 2015 23:49:52 +0000 (19:49 -0400)
committerKevin Wolf <[email protected]>
Tue, 28 Apr 2015 13:36:10 +0000 (15:36 +0200)
commit341ebc2f81b14862347e4d4c1fcb3759f815237a
treeb9c98812c4ac6a00c55d94d4a305ca7ce07403ad
parent5fba6c0e50b66691568b34d5a2f4be0b39f5e20a
qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

The new command pair is added to manage a user created dirty bitmap. The
dirty bitmap's name is mandatory and must be unique for the same device,
but different devices can have bitmaps with the same names.

The granularity is an optional field. If it is not specified, we will
choose a default granularity based on the cluster size if available,
clamped to between 4K and 64K to mirror how the 'mirror' code was
already choosing granularity. If we do not have cluster size info
available, we choose 64K. This code has been factored out into a helper
shared with block/mirror.

This patch also introduces the 'block_dirty_bitmap_lookup' helper,
which takes a device name and a dirty bitmap name and validates the
lookup, returning NULL and setting errp if there is a problem with
either field. This helper will be re-used in future patches in this
series.

The types added to block-core.json will be re-used in future patches
in this series, see:
'qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}'

Signed-off-by: John Snow <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 1429314609[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block.c
block/mirror.c
blockdev.c
include/block/block.h
qapi/block-core.json
qmp-commands.hx
This page took 0.027502 seconds and 4 git commands to generate.