From nobody Fri May 16 04:58:00 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1501063379893711.2509631505271; Wed, 26 Jul 2017 03:02:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BCDB83F42; Wed, 26 Jul 2017 10:02:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81E6568D50; Wed, 26 Jul 2017 10:02:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 33966180BA80; Wed, 26 Jul 2017 10:02:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6QA1AI1008881 for ; Wed, 26 Jul 2017 06:01:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 083C46FE7A; Wed, 26 Jul 2017 10:01:10 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5051A6FE76; Wed, 26 Jul 2017 10:01:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7BCDB83F42 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 26 Jul 2017 12:00:43 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 13/24] util: storagefile: rename 'nodebacking' to 'nodestorage' in virStorageSource X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 26 Jul 2017 10:02:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Make it less confusing by naming the field which refers to the storage object as 'nodestorage'. --- src/qemu/qemu_block.c | 10 +++++----- src/qemu/qemu_driver.c | 10 +++++----- src/util/virstoragefile.c | 6 +++--- src/util/virstoragefile.h | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 3afcbde94..dc96a43e1 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -305,7 +305,7 @@ qemuBlockDiskClearDetectedNodes(virDomainDiskDefPtr dis= k) while (next) { VIR_FREE(next->nodeformat); - VIR_FREE(next->nodebacking); + VIR_FREE(next->nodestorage); next =3D next->backingStore; } @@ -321,22 +321,22 @@ qemuBlockDiskDetectNodes(virDomainDiskDefPtr disk, virStorageSourcePtr src =3D 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 =3D 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; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9c54571cf..fe65b5776 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19492,8 +19492,8 @@ qemuDomainGetStatsOneBlockNode(virDomainStatsRecord= Ptr record, unsigned long long tmp; int ret =3D -1; - if (src->nodebacking && - (data =3D virHashLookup(nodedata, src->nodebacking))) { + if (src->nodestorage && + (data =3D virHashLookup(nodedata, src->nodestorage))) { if (virJSONValueObjectGetNumberUlong(data, "write_threshold", &tmp= ) =3D=3D 0 && tmp > 0) QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx, @@ -20676,18 +20676,18 @@ qemuDomainSetBlockThreshold(virDomainPtr dom, if (!(src =3D 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 devic= e '%s'"), dev); goto endjob; } - if (VIR_STRDUP(nodename, src->nodebacking) < 0) + if (VIR_STRDUP(nodename, src->nodestorage) < 0) goto endjob; qemuDomainObjEnterMonitor(driver, vm); diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 0add4c146..fbc8245f3 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -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 to= p, for (tmp =3D top; tmp; tmp =3D 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) diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index d1e8ffe07..6c388b1a5 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -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 */ }; --=20 2.13.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list