From nobody Mon Feb 9 17:23:58 2026 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1553003018027200.06036133815394; Tue, 19 Mar 2019 06:43:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA9226699D; Tue, 19 Mar 2019 13:43:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 901801001E7F; Tue, 19 Mar 2019 13:43:35 +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 5735441F3D; Tue, 19 Mar 2019 13:43:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2JDgbgB011164 for ; Tue, 19 Mar 2019 09:42:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1C69160FAB; Tue, 19 Mar 2019 13:42:37 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 177DA60F94 for ; Tue, 19 Mar 2019 13:42:34 +0000 (UTC) Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1C10C056793 for ; Tue, 19 Mar 2019 13:42:34 +0000 (UTC) Received: by mail-qk1-f199.google.com with SMTP id k21so17716610qkg.19 for ; Tue, 19 Mar 2019 06:42:34 -0700 (PDT) Received: from cube-1.lan (pool-96-241-25-63.washdc.fios.verizon.net. [96.241.25.63]) by smtp.gmail.com with ESMTPSA id l123sm7037514qkf.90.2019.03.19.06.42.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Mar 2019 06:42:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ibJIqGoB3hEoOGxGIEjtn2rrB3y8ggDdJjXWu4kAwMI=; b=Dzd4iA/ketHeVDvWTg0IA9Gj4a9iP3w8XcbsOdjREJJQTqpJ3qwJDBvJzHk/G2zJIx u6zJFMSHiVl2OiTekW1W5N5S8WDu1Kad0JGoOatdBvrIIFK0qeTWN1pO/8vriXPyv33O 5rEDXySB5bHPa6sMTmlL9v2feLmqHe2Kg7fOl161nqQ9TYe7GflrmTr06hK8Dmn0s5u3 aftVJ+NHWxmEOkR6yU1K6oCb6Cg0SnRT0Xshpz70PjYr9YBabxuFNIzoIeWlpUmrTkNG ofWwbsxOv3Vnb8Qhi5JbirBPCYgZAz1VCxQVIW+49eRE1VyvRC383lsnzty0BAZmffTO cYEg== X-Gm-Message-State: APjAAAUkCHRE8/NdRd/fW7XmdfSvVHP/XDEb9KAB4xQUdDBaCb7q/EBE PmKYt691LfXf0MZH9GSlCqMui5i9zBD4LBew0vIeE9sYsIXS2ddDbw0FbGFyauGU333gxCLP0VS nPyBBx1pInWs+u3pi+FE= X-Received: by 2002:ac8:3328:: with SMTP id t37mr2096515qta.246.1553002953697; Tue, 19 Mar 2019 06:42:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzn+Pe35kyG8ue1uqD4Woh/v6Q9AqVMjkoFAanuLq0hkFQBYi1vIAZq970oiGUbltiU23MnSg== X-Received: by 2002:ac8:3328:: with SMTP id t37mr2096501qta.246.1553002953417; Tue, 19 Mar 2019 06:42:33 -0700 (PDT) From: jdillama@redhat.com X-Google-Original-From: dillaman@redhat.com To: libvir-list@redhat.com Date: Tue, 19 Mar 2019 09:42:17 -0400 Message-Id: <20190319134218.13517-3-dillaman@redhat.com> In-Reply-To: <20190319134218.13517-1-dillaman@redhat.com> References: <20190319134218.13517-1-dillaman@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Jason Dillaman Subject: [libvirt] [PATCH v3 2/3] storage: optional 'refresh' elemement on pool 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 19 Mar 2019 13:43:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" From: Jason Dillaman The new 'refresh' element can override the default refresh operations for a storage pool. The only currently supported override is to set the volume allocation size to the volume capacity. This can be specified by adding the following snippet: ... ... This is useful for certain backends where computing the actual allocation of a volume might be an expensive operation. Signed-off-by: Jason Dillaman --- docs/formatstorage.html.in | 27 +++++++++++++++++++ docs/schemas/storagecommon.rng | 7 +++++ docs/schemas/storagepool.rng | 23 ++++++++++++++++ src/conf/storage_conf.c | 27 +++++++++++++++++++ src/conf/storage_conf.h | 9 +++++++ .../pool-rbd-refresh-volume-allocation.xml | 15 +++++++++++ .../pool-rbd-refresh-volume-allocation.xml | 18 +++++++++++++ tests/storagepoolxml2xmltest.c | 1 + 8 files changed, 127 insertions(+) create mode 100644 tests/storagepoolxml2xmlin/pool-rbd-refresh-volume-allo= cation.xml create mode 100644 tests/storagepoolxml2xmlout/pool-rbd-refresh-volume-all= ocation.xml diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in index 968651330f..680950ff20 100644 --- a/docs/formatstorage.html.in +++ b/docs/formatstorage.html.in @@ -508,6 +508,33 @@ device, measured in bytes. Since 0.4.1

=20 +

Refresh overrides

+ +

+ The optional refresh element can control how the pool a= nd + associated volumes are refreshed (pool type rbd). The + allocation attribute of the volume child e= lement + controls the method used for computing the allocation of a volume. T= he + valid attribute values are default to compute the actual + usage or capacity to use the logical capacity for cases= where + computing the allocation is too expensive. The following XML snippet + shows the syntax: +

+<pool type=3D"rbd">
+  <name>myrbdpool</name>
+...
+  <source>
+...
+  </source>
+...
+  <refresh>
+    <volume allocation=3D'capacity'/>
+  </refresh>
+</pool>
+...
+ Since 5.2.0 +

+

Storage Pool Namespaces

=20

diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng index 63b51470a0..d837f92bc7 100644 --- a/docs/schemas/storagecommon.rng +++ b/docs/schemas/storagecommon.rng @@ -236,4 +236,11 @@ =20 + + + default + capacity + + + diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index 3907f70afe..3ca8e790ea 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -155,6 +155,7 @@ + @@ -691,6 +692,28 @@ =20 + + + + + + + + + + + + + + + + + + + + + +