Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_backup.c | 4 ++--
src/qemu/qemu_checkpoint.c | 2 +-
src/qemu/qemu_monitor.c | 6 ++++--
src/qemu/qemu_monitor.h | 3 ++-
src/qemu/qemu_monitor_json.c | 4 +++-
src/qemu/qemu_monitor_json.h | 3 ++-
tests/qemumonitorjsontest.c | 2 +-
7 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index c9709dc29a..5c9747f09d 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -201,7 +201,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd,
dd->domdisk->src->nodeformat,
dd->incrementalBitmap,
false,
- true) < 0)
+ true, 0) < 0)
return -1;
if (qemuMonitorTransactionBitmapMerge(actions,
@@ -214,7 +214,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd,
dd->store->nodeformat,
dd->incrementalBitmap,
false,
- true) < 0)
+ true, 0) < 0)
return -1;
if (qemuMonitorTransactionBitmapMerge(actions,
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index 38638c3b1e..97bc97bb8e 100644
--- a/src/qemu/qemu_checkpoint.c
+++ b/src/qemu/qemu_checkpoint.c
@@ -309,7 +309,7 @@ qemuCheckpointAddActions(virDomainObjPtr vm,
if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
continue;
node = qemuDomainDiskNodeFormatLookup(vm, disk->name);
- if (qemuMonitorTransactionBitmapAdd(actions, node, disk->bitmap, true, false)
< 0)
+ if (qemuMonitorTransactionBitmapAdd(actions, node, disk->bitmap, true, false,
0) < 0)
return -1;
/* We only want one active bitmap for a disk along the
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index ea3e62dc8e..ccd20b3740 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -4543,9 +4543,11 @@ qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions,
const char *node,
const char *name,
bool persistent,
- bool disabled)
+ bool disabled,
+ unsigned long long granularity)
{
- return qemuMonitorJSONTransactionBitmapAdd(actions, node, name, persistent,
disabled);
+ return qemuMonitorJSONTransactionBitmapAdd(actions, node, name, persistent,
+ disabled, granularity);
}
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 1c990923d6..3f3b81cddd 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1374,7 +1374,8 @@ qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions,
const char *node,
const char *name,
bool persistent,
- bool disabled);
+ bool disabled,
+ unsigned long long granularity);
int
qemuMonitorTransactionBitmapRemove(virJSONValuePtr actions,
const char *node,
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 856c2c2778..4e1bcaa30d 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -9159,7 +9159,8 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
const char *node,
const char *name,
bool persistent,
- bool disabled)
+ bool disabled,
+ unsigned long long granularity)
{
return qemuMonitorJSONTransactionAdd(actions,
"block-dirty-bitmap-add",
@@ -9167,6 +9168,7 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
"s:name", name,
"b:persistent", persistent,
"b:disabled", disabled,
+ "P:granularity", granularity,
NULL);
}
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 44926464b9..61f5b0061d 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -636,7 +636,8 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
const char *node,
const char *name,
bool persistent,
- bool disabled);
+ bool disabled,
+ unsigned long long granularity);
int
qemuMonitorJSONTransactionBitmapRemove(virJSONValuePtr actions,
const char *node,
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 4f3bfad1d7..3b0f85e7c9 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2956,7 +2956,7 @@ testQemuMonitorJSONTransaction(const void *opaque)
qemuMonitorTransactionBitmapMergeSourceAddBitmap(mergebitmaps, "node2",
"bitmap2") < 0)
return -1;
- if (qemuMonitorTransactionBitmapAdd(actions, "node1", "bitmap1",
true, true) < 0 ||
+ if (qemuMonitorTransactionBitmapAdd(actions, "node1", "bitmap1",
true, true, 1234) < 0 ||
qemuMonitorTransactionBitmapRemove(actions, "node2",
"bitmap2") < 0 ||
qemuMonitorTransactionBitmapEnable(actions, "node3",
"bitmap3") < 0 ||
qemuMonitorTransactionBitmapDisable(actions, "node4",
"bitmap4") < 0 ||
--
2.23.0