提交 f1bc1f0f 编写于 作者: P Peter Krempa

qemu: monitor: Add 'granularity' parameter for block-dirty-bitmap-add

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 19464852
...@@ -201,7 +201,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd, ...@@ -201,7 +201,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd,
dd->domdisk->src->nodeformat, dd->domdisk->src->nodeformat,
dd->incrementalBitmap, dd->incrementalBitmap,
false, false,
true) < 0) true, 0) < 0)
return -1; return -1;
if (qemuMonitorTransactionBitmapMerge(actions, if (qemuMonitorTransactionBitmapMerge(actions,
...@@ -214,7 +214,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd, ...@@ -214,7 +214,7 @@ qemuBackupDiskPrepareOneBitmaps(struct qemuBackupDiskData *dd,
dd->store->nodeformat, dd->store->nodeformat,
dd->incrementalBitmap, dd->incrementalBitmap,
false, false,
true) < 0) true, 0) < 0)
return -1; return -1;
if (qemuMonitorTransactionBitmapMerge(actions, if (qemuMonitorTransactionBitmapMerge(actions,
......
...@@ -309,7 +309,7 @@ qemuCheckpointAddActions(virDomainObjPtr vm, ...@@ -309,7 +309,7 @@ qemuCheckpointAddActions(virDomainObjPtr vm,
if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP) if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
continue; continue;
node = qemuDomainDiskNodeFormatLookup(vm, disk->name); 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; return -1;
/* We only want one active bitmap for a disk along the /* We only want one active bitmap for a disk along the
......
...@@ -4543,9 +4543,11 @@ qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions, ...@@ -4543,9 +4543,11 @@ qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions,
const char *node, const char *node,
const char *name, const char *name,
bool persistent, 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);
} }
......
...@@ -1374,7 +1374,8 @@ qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions, ...@@ -1374,7 +1374,8 @@ qemuMonitorTransactionBitmapAdd(virJSONValuePtr actions,
const char *node, const char *node,
const char *name, const char *name,
bool persistent, bool persistent,
bool disabled); bool disabled,
unsigned long long granularity);
int int
qemuMonitorTransactionBitmapRemove(virJSONValuePtr actions, qemuMonitorTransactionBitmapRemove(virJSONValuePtr actions,
const char *node, const char *node,
......
...@@ -9153,7 +9153,8 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions, ...@@ -9153,7 +9153,8 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
const char *node, const char *node,
const char *name, const char *name,
bool persistent, bool persistent,
bool disabled) bool disabled,
unsigned long long granularity)
{ {
return qemuMonitorJSONTransactionAdd(actions, return qemuMonitorJSONTransactionAdd(actions,
"block-dirty-bitmap-add", "block-dirty-bitmap-add",
...@@ -9161,6 +9162,7 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions, ...@@ -9161,6 +9162,7 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
"s:name", name, "s:name", name,
"b:persistent", persistent, "b:persistent", persistent,
"b:disabled", disabled, "b:disabled", disabled,
"P:granularity", granularity,
NULL); NULL);
} }
......
...@@ -636,7 +636,8 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions, ...@@ -636,7 +636,8 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
const char *node, const char *node,
const char *name, const char *name,
bool persistent, bool persistent,
bool disabled); bool disabled,
unsigned long long granularity);
int int
qemuMonitorJSONTransactionBitmapRemove(virJSONValuePtr actions, qemuMonitorJSONTransactionBitmapRemove(virJSONValuePtr actions,
const char *node, const char *node,
......
...@@ -2956,7 +2956,7 @@ testQemuMonitorJSONTransaction(const void *opaque) ...@@ -2956,7 +2956,7 @@ testQemuMonitorJSONTransaction(const void *opaque)
qemuMonitorTransactionBitmapMergeSourceAddBitmap(mergebitmaps, "node2", "bitmap2") < 0) qemuMonitorTransactionBitmapMergeSourceAddBitmap(mergebitmaps, "node2", "bitmap2") < 0)
return -1; return -1;
if (qemuMonitorTransactionBitmapAdd(actions, "node1", "bitmap1", true, true) < 0 || if (qemuMonitorTransactionBitmapAdd(actions, "node1", "bitmap1", true, true, 1234) < 0 ||
qemuMonitorTransactionBitmapRemove(actions, "node2", "bitmap2") < 0 || qemuMonitorTransactionBitmapRemove(actions, "node2", "bitmap2") < 0 ||
qemuMonitorTransactionBitmapEnable(actions, "node3", "bitmap3") < 0 || qemuMonitorTransactionBitmapEnable(actions, "node3", "bitmap3") < 0 ||
qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") < 0 || qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") < 0 ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册