New semantics of the bitmap handling don't need this. Remove the field
and all uses of it including the status XML.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_blockjob.c | 44 -------------------
src/qemu/qemu_blockjob.h | 3 --
src/qemu/qemu_domain.c | 22 ----------
src/qemu/qemu_driver.c | 3 +-
.../blockjob-blockdev-in.xml | 4 --
5 files changed, 1 insertion(+), 75 deletions(-)
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 8e81b142f4..58ba3e6e96 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -84,11 +84,6 @@ qemuBlockJobDataDisposeJobdata(qemuBlockJobDataPtr job)
virObjectUnref(job->data.backup.store);
g_free(job->data.backup.bitmap);
}
-
- if (job->type == QEMU_BLOCKJOB_TYPE_COMMIT ||
- job->type == QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT) {
- virStringListFree(job->data.commit.disabledBitmapsBase);
- }
}
@@ -290,7 +285,6 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm,
virStorageSourcePtr topparent,
virStorageSourcePtr top,
virStorageSourcePtr base,
- char ***disabledBitmapsBase,
bool delete_imgs,
unsigned int jobflags)
{
@@ -316,7 +310,6 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm,
job->data.commit.top = top;
job->data.commit.base = base;
job->data.commit.deleteCommittedImages = delete_imgs;
- job->data.commit.disabledBitmapsBase = g_steal_pointer(disabledBitmapsBase);
job->jobflags = jobflags;
if (qemuBlockJobRegister(job, vm, disk, true) < 0)
@@ -1369,40 +1362,6 @@ qemuBlockJobProcessEventFailedActiveCommit(virQEMUDriverPtr
driver,
}
-static void
-qemuBlockJobProcessEventFailedCommitCommon(virDomainObjPtr vm,
- qemuBlockJobDataPtr job,
- qemuDomainAsyncJob asyncJob)
-{
- qemuDomainObjPrivatePtr priv = vm->privateData;
- g_autoptr(virJSONValue) actions = virJSONValueNewArray();
- char **disabledBitmaps = job->data.commit.disabledBitmapsBase;
-
- if (!disabledBitmaps || !*disabledBitmaps)
- return;
-
- for (; *disabledBitmaps; disabledBitmaps++) {
- qemuMonitorTransactionBitmapEnable(actions,
- job->data.commit.base->nodeformat,
- *disabledBitmaps);
- }
-
- if (qemuBlockReopenReadWrite(vm, job->data.commit.base, asyncJob) < 0)
- return;
-
- if (qemuDomainObjEnterMonitorAsync(priv->driver, vm, asyncJob) < 0)
- return;
-
- qemuMonitorTransaction(priv->mon, &actions);
-
- if (qemuDomainObjExitMonitor(priv->driver, vm) < 0)
- return;
-
- if (qemuBlockReopenReadOnly(vm, job->data.commit.base, asyncJob) < 0)
- return;
-}
-
-
static void
qemuBlockJobProcessEventConcludedCreate(virQEMUDriverPtr driver,
virDomainObjPtr vm,
@@ -1510,8 +1469,6 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlockJobDataPtr
job,
case QEMU_BLOCKJOB_TYPE_COMMIT:
if (success)
qemuBlockJobProcessEventCompletedCommit(driver, vm, job, asyncJob);
- else
- qemuBlockJobProcessEventFailedCommitCommon(vm, job, asyncJob);
break;
case QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT:
@@ -1519,7 +1476,6 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlockJobDataPtr
job,
qemuBlockJobProcessEventCompletedActiveCommit(driver, vm, job, asyncJob);
} else {
qemuBlockJobProcessEventFailedActiveCommit(driver, vm, job);
- qemuBlockJobProcessEventFailedCommitCommon(vm, job, asyncJob);
}
break;
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index 19498b5bd8..9f73a3547c 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -88,8 +88,6 @@ struct _qemuBlockJobCommitData {
virStorageSourcePtr top;
virStorageSourcePtr base;
bool deleteCommittedImages;
- char **disabledBitmapsBase; /* a NULL-terminated list of bitmap names which
- were disabled in @base for the commit job */
};
@@ -187,7 +185,6 @@ qemuBlockJobDiskNewCommit(virDomainObjPtr vm,
virStorageSourcePtr topparent,
virStorageSourcePtr top,
virStorageSourcePtr base,
- char ***disabledBitmapsBase,
bool delete_imgs,
unsigned int jobflags);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 2dad823a86..0548e9c2e6 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2623,7 +2623,6 @@ qemuDomainPrivateBlockJobFormatCommit(qemuBlockJobDataPtr job,
virBufferPtr buf)
{
g_auto(virBuffer) disabledBitmapsBuf = VIR_BUFFER_INIT_CHILD(buf);
- char **bitmaps = job->data.commit.disabledBitmapsBase;
if (job->data.commit.base)
virBufferAsprintf(buf, "<base node='%s'/>\n",
job->data.commit.base->nodeformat);
@@ -2637,9 +2636,6 @@ qemuDomainPrivateBlockJobFormatCommit(qemuBlockJobDataPtr job,
if (job->data.commit.deleteCommittedImages)
virBufferAddLit(buf, "<deleteCommittedImages/>\n");
- while (bitmaps && *bitmaps)
- virBufferEscapeString(&disabledBitmapsBuf, "<bitmap
name='%s'/>\n", *(bitmaps++));
-
virXMLFormatElement(buf, "disabledBaseBitmaps", NULL,
&disabledBitmapsBuf);
}
@@ -3260,9 +3256,6 @@ static int
qemuDomainObjPrivateXMLParseBlockjobDataCommit(qemuBlockJobDataPtr job,
xmlXPathContextPtr ctxt)
{
- g_autofree xmlNodePtr *nodes = NULL;
- ssize_t nnodes;
-
if (job->type == QEMU_BLOCKJOB_TYPE_COMMIT) {
qemuDomainObjPrivateXMLParseBlockjobNodename(job,
"string(./topparent/@node)",
@@ -3289,21 +3282,6 @@ qemuDomainObjPrivateXMLParseBlockjobDataCommit(qemuBlockJobDataPtr
job,
!job->data.commit.base)
return -1;
- if ((nnodes = virXPathNodeSet("./disabledBaseBitmaps/bitmap", ctxt,
&nodes)) > 0) {
- size_t i;
-
- job->data.commit.disabledBitmapsBase = g_new0(char *, nnodes + 1);
-
- for (i = 0; i < nnodes; i++) {
- char *tmp;
-
- if (!(tmp = virXMLPropString(nodes[i], "name")))
- return -1;
-
- job->data.commit.disabledBitmapsBase[i] = g_steal_pointer(&tmp);
- }
- }
-
return 0;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6256046762..8cf3629a80 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18481,7 +18481,6 @@ qemuDomainBlockCommit(virDomainPtr dom,
const char *nodebase = NULL;
bool persistjob = false;
bool blockdev = false;
- VIR_AUTOSTRINGLIST bitmapDisableList = NULL;
virCheckFlags(VIR_DOMAIN_BLOCK_COMMIT_SHALLOW |
VIR_DOMAIN_BLOCK_COMMIT_ACTIVE |
@@ -18646,7 +18645,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
}
if (!(job = qemuBlockJobDiskNewCommit(vm, disk, top_parent, topSource,
- baseSource, &bitmapDisableList,
+ baseSource,
flags & VIR_DOMAIN_BLOCK_COMMIT_DELETE,
flags)))
goto endjob;
diff --git a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
b/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
index cc17a17ff4..ca6d110179 100644
--- a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
+++ b/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
@@ -243,10 +243,6 @@
<base node='libvirt-19-format'/>
<top node='libvirt-17-format'/>
<deleteCommittedImages/>
- <disabledBaseBitmaps>
- <bitmap name='test'/>
- <bitmap name='test1'/>
- </disabledBaseBitmaps>
</blockjob>
<blockjob name='create-libvirt-1337-storage' type='create'
state='running'>
<create mode='storage'/>
--
2.26.2