mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
util: storagefile: rename 'nodebacking' to 'nodestorage' in virStorageSource
Make it less confusing by naming the field which refers to the storage object as 'nodestorage'. Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
4a58dfc24e
commit
c61d169327
@ -305,7 +305,7 @@ qemuBlockDiskClearDetectedNodes(virDomainDiskDefPtr disk)
|
||||
|
||||
while (next) {
|
||||
VIR_FREE(next->nodeformat);
|
||||
VIR_FREE(next->nodebacking);
|
||||
VIR_FREE(next->nodestorage);
|
||||
|
||||
next = next->backingStore;
|
||||
}
|
||||
@ -321,22 +321,22 @@ qemuBlockDiskDetectNodes(virDomainDiskDefPtr disk,
|
||||
virStorageSourcePtr src = disk->src;
|
||||
|
||||
/* don't attempt the detection if the top level already has node names */
|
||||
if (!parentnode || src->nodeformat || src->nodebacking)
|
||||
if (!parentnode || src->nodeformat || src->nodestorage)
|
||||
return 0;
|
||||
|
||||
while (src && parentnode) {
|
||||
if (!(entry = virHashLookup(table, parentnode)))
|
||||
break;
|
||||
|
||||
if (src->nodeformat || src->nodebacking) {
|
||||
if (src->nodeformat || src->nodestorage) {
|
||||
if (STRNEQ_NULLABLE(src->nodeformat, entry->nodeformat) ||
|
||||
STRNEQ_NULLABLE(src->nodebacking, entry->nodestorage))
|
||||
STRNEQ_NULLABLE(src->nodestorage, entry->nodestorage))
|
||||
goto error;
|
||||
|
||||
break;
|
||||
} else {
|
||||
if (VIR_STRDUP(src->nodeformat, entry->nodeformat) < 0 ||
|
||||
VIR_STRDUP(src->nodebacking, entry->nodestorage) < 0)
|
||||
VIR_STRDUP(src->nodestorage, entry->nodestorage) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -19490,8 +19490,8 @@ qemuDomainGetStatsOneBlockNode(virDomainStatsRecordPtr record,
|
||||
unsigned long long tmp;
|
||||
int ret = -1;
|
||||
|
||||
if (src->nodebacking &&
|
||||
(data = virHashLookup(nodedata, src->nodebacking))) {
|
||||
if (src->nodestorage &&
|
||||
(data = virHashLookup(nodedata, src->nodestorage))) {
|
||||
if (virJSONValueObjectGetNumberUlong(data, "write_threshold", &tmp) == 0 &&
|
||||
tmp > 0)
|
||||
QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx,
|
||||
@ -20674,18 +20674,18 @@ qemuDomainSetBlockThreshold(virDomainPtr dom,
|
||||
if (!(src = qemuDomainGetStorageSourceByDevstr(dev, vm->def)))
|
||||
goto endjob;
|
||||
|
||||
if (!src->nodebacking &&
|
||||
if (!src->nodestorage &&
|
||||
qemuBlockNodeNamesDetect(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (!src->nodebacking) {
|
||||
if (!src->nodestorage) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("threshold currently can't be set for block device '%s'"),
|
||||
dev);
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (VIR_STRDUP(nodename, src->nodebacking) < 0)
|
||||
if (VIR_STRDUP(nodename, src->nodestorage) < 0)
|
||||
goto endjob;
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
@ -2050,7 +2050,7 @@ virStorageSourceCopy(const virStorageSource *src,
|
||||
VIR_STRDUP(ret->snapshot, src->snapshot) < 0 ||
|
||||
VIR_STRDUP(ret->configFile, src->configFile) < 0 ||
|
||||
VIR_STRDUP(ret->nodeformat, src->nodeformat) < 0 ||
|
||||
VIR_STRDUP(ret->nodebacking, src->nodebacking) < 0 ||
|
||||
VIR_STRDUP(ret->nodestorage, src->nodestorage) < 0 ||
|
||||
VIR_STRDUP(ret->compat, src->compat) < 0)
|
||||
goto error;
|
||||
|
||||
@ -2271,7 +2271,7 @@ virStorageSourceClear(virStorageSourcePtr def)
|
||||
virStorageNetHostDefFree(def->nhosts, def->hosts);
|
||||
virStorageAuthDefFree(def->auth);
|
||||
|
||||
VIR_FREE(def->nodebacking);
|
||||
VIR_FREE(def->nodestorage);
|
||||
VIR_FREE(def->nodeformat);
|
||||
|
||||
virStorageSourceBackingStoreClear(def);
|
||||
@ -3941,7 +3941,7 @@ virStorageSourceFindByNodeName(virStorageSourcePtr top,
|
||||
|
||||
for (tmp = top; tmp; tmp = tmp->backingStore) {
|
||||
if ((tmp->nodeformat && STREQ(tmp->nodeformat, nodeName)) ||
|
||||
(tmp->nodebacking && STREQ(tmp->nodebacking, nodeName)))
|
||||
(tmp->nodestorage && STREQ(tmp->nodestorage, nodeName)))
|
||||
return tmp;
|
||||
|
||||
if (idx)
|
||||
|
@ -279,7 +279,7 @@ struct _virStorageSource {
|
||||
|
||||
/* metadata that allows identifying given storage source */
|
||||
char *nodeformat; /* name of the format handler object */
|
||||
char *nodebacking; /* name of the backing storage object */
|
||||
char *nodestorage; /* name of the storage object */
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user