From patchwork Mon Oct 7 21:49:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 175421 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4845830ill; Mon, 7 Oct 2019 14:49:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxze/uA18HKAGR5OvNSrnBQclXn9HrL1e8J85H/bnhK4jm0ZIf2gER67DeVaT4tQc9WJoU X-Received: by 2002:a02:9f02:: with SMTP id z2mr28147066jal.78.1570484980419; Mon, 07 Oct 2019 14:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570484980; cv=none; d=google.com; s=arc-20160816; b=GlzA0BOCWgWpfeA+b8qty6eJsEvVIp/qDwzydPKD6sSMd9w+vyycn9wLbbYiSkKYEf s1uko3WLOwXqmar9z5WW3EAd0wAPe62/T3Ykab7+TPvKYRlwxtlqHYighQyLJzFjMKFM zJNuddj1UszXb4T7oL6ba0+HONe+4JL6g/2YpB6wTSvhwxpsb7vP+Rr8J7XPfevFSEYd yr1AN7BfMjrbHtpB0mLnnBkNjMvnzCWwE6BKIB4gQ5W6dZP6aGTsZrCrhHgdJarvJf/T kRn7K/BLopFuzh/nbgCqVr/8YfGm6mh5WhpI5Ax4I7R660NFdn2g8SLhbSiS+HPwMv/B CA+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=Mubs0GLh1rcpHXBMvKaTntU6dv9FxY8xGdAaUcK3pDI=; b=kLfWLOtxXD8t2vUqbmoyKupzyFdAdxIoJj9IrRyz3wba9Gnc+1HtB6eDRi0HX+qNi7 3Ox9FYqI5PoWNDaVToR/IbFTsXlB7zRY82ojgplwIjYH5VLcdP3aH/2raXJxPELrNbMO YlwvwaEZ4QiQAg0zD6b5UVNvr2InrKgPCINlRmpzS+/j7L415HSuI/CVg2QBr/hzk5cm NwGDM1/x1hSnEueaoI5bTxwE5RqkDzxuvUmWRFGteYFCb4A/t1KU+FtL8QggRSZq2CBF ptQcW5n6CigbaSbvcvBwrEni7WP2QCnJjYR1tA23MQ9OGHJ0qDTU+SbMxiWfQHRErJuo BoLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id p10si20717733ilh.83.2019.10.07.14.49.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Oct 2019 14:49:40 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14EB718C4269; Mon, 7 Oct 2019 21:49:39 +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 DE29C5B681; Mon, 7 Oct 2019 21:49:38 +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 98E85180B761; Mon, 7 Oct 2019 21:49:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x97LnbY4014641 for ; Mon, 7 Oct 2019 17:49:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 099DF5C224; Mon, 7 Oct 2019 21:49:37 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from worklaptop.redhat.com (ovpn-123-156.rdu2.redhat.com [10.10.123.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D33F5C223; Mon, 7 Oct 2019 21:49:31 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 7 Oct 2019 17:49:27 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/30] storagefile: Add externalDataStoreRaw member 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Mon, 07 Oct 2019 21:49:39 +0000 (UTC) Add the plumbing to track a qcow2 external data file path in virStorageSource Signed-off-by: Cole Robinson --- src/util/virstoragefile.c | 2 ++ src/util/virstoragefile.h | 2 ++ 2 files changed, 4 insertions(+) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Daniel Henrique Barboza diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 5a4e4b24ae..621cc56e87 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2258,6 +2258,7 @@ virStorageSourceCopy(const virStorageSource *src, VIR_STRDUP(def->volume, src->volume) < 0 || VIR_STRDUP(def->relPath, src->relPath) < 0 || VIR_STRDUP(def->backingStoreRaw, src->backingStoreRaw) < 0 || + VIR_STRDUP(def->externalDataStoreRaw, src->externalDataStoreRaw) < 0 || VIR_STRDUP(def->snapshot, src->snapshot) < 0 || VIR_STRDUP(def->configFile, src->configFile) < 0 || VIR_STRDUP(def->nodeformat, src->nodeformat) < 0 || @@ -2533,6 +2534,7 @@ virStorageSourceClear(virStorageSourcePtr def) virStorageSourceSeclabelsClear(def); virStoragePermsFree(def->perms); VIR_FREE(def->timestamps); + VIR_FREE(def->externalDataStoreRaw); virStorageNetHostDefFree(def->nhosts, def->hosts); virStorageAuthDefFree(def->auth); diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 2472d89c85..bbff511657 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -302,6 +302,8 @@ struct _virStorageSource { /* Name of the child backing store recorded in metadata of the * current file. */ char *backingStoreRaw; + /* Name of the child data file recorded in metadata of the current file. */ + char *externalDataStoreRaw; /* metadata that allows identifying given storage source */ char *nodeformat; /* name of the format handler object */