conf: add control over COW for storage pool directories

The storage pool code now attempts to disable COW by default on btrfs,
but management applications may wish to override this behaviour. Thus we
introduce a concept of storage pool features:

  <features>
    <cow state='yes|no'/>
  </features>

If the <cow> feature policy is set, it will be enforced. It will always
return an hard error if COW cannot be explicitly set or unset.

Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2020-07-23 16:18:09 +01:00
parent f12b283897
commit bb8ccb050d
8 changed files with 139 additions and 1 deletions
+25
View File
@@ -67,6 +67,31 @@
pool. <span class="since">Since 0.4.1</span></dd>
</dl>
<h3><a id="StoragePoolFeatures">Features</a></h3>
<p>
Some pools support optional features:
</p>
<pre>
...
&lt;features&gt;
&lt;cow state='no'&gt;
&lt;/features&gt;
...</pre>
<p>
Valid features are:
</p>
<ul>
<dd><code>cow</code></dd>
<dt>Controls whether the filesystem performs copy-on-write (COW) for
images in the pool. This may only be set for directory / filesystem
pools on the <code>btrfs</code> filesystem. If not set then libvirt
will attempt to disable COW on any btrfs filesystems.
<span class="since">Since 6.6.0</span>.</dt>
</ul>
<h3><a id="StoragePoolSource">Source elements</a></h3>
<p>