提交 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,
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,
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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,
......
......@@ -9153,7 +9153,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",
......@@ -9161,6 +9162,7 @@ qemuMonitorJSONTransactionBitmapAdd(virJSONValuePtr actions,
"s:name", name,
"b:persistent", persistent,
"b:disabled", disabled,
"P:granularity", granularity,
NULL);
}
......
......@@ -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,
......
......@@ -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 ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册