summary refs log tree commit diff stats
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-04-17 19:49:59 -0400
committerKevin Wolf <kwolf@redhat.com>2015-04-28 15:36:10 +0200
commite74e6b78e6fe0c9ee426d1278fff45f5fa0af766 (patch)
tree7e076da8b90218a37041d5ec59bc3c747abd7a7b /qmp-commands.hx
parentd58d84539784d27c826924a79d9436178b07ff69 (diff)
downloadfocaccia-qemu-e74e6b78e6fe0c9ee426d1278fff45f5fa0af766.tar.gz
focaccia-qemu-e74e6b78e6fe0c9ee426d1278fff45f5fa0af766.zip
qmp: add block-dirty-bitmap-clear
Add bdrv_clear_dirty_bitmap and a matching QMP command,
qmp_block_dirty_bitmap_clear that enables a user to reset
the bitmap attached to a drive.

This allows us to reset a bitmap in the event of a full
drive backup.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1429314609-29776-12-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx29
1 files changed, 29 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 9b10d3d2e8..213508fe5d 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1364,6 +1364,35 @@ Example:
 EQMP
 
     {
+        .name       = "block-dirty-bitmap-clear",
+        .args_type  = "node:B,name:s",
+        .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_clear,
+    },
+
+SQMP
+
+block-dirty-bitmap-clear
+------------------------
+Since 2.4
+
+Reset the dirty bitmap associated with a node so that an incremental backup
+from this point in time forward will only backup clusters modified after this
+clear operation.
+
+Arguments:
+
+- "node": device/node on which to remove dirty bitmap (json-string)
+- "name": name of the dirty bitmap to remove (json-string)
+
+Example:
+
+-> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
+                                                           "name": "bitmap0" } }
+<- { "return": {} }
+
+EQMP
+
+    {
         .name       = "blockdev-snapshot-sync",
         .args_type  = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
         .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,