Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
docs/formatdomaincaps.html.in | 28 ++++++++++++++++++++++++++++
docs/schemas/domaincaps.rng | 10 ++++++++++
src/conf/domain_capabilities.c | 13 +++++++++++++
src/conf/domain_capabilities.h | 8 ++++++++
4 files changed, 59 insertions(+)
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 2d417b6953..62f1940e6a 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -518,6 +518,34 @@
</dl>
+ <h4><a id="elementsFilesystem">Filesystem
device</a></h4>
+ <p>Filesystem device capabilities are exposed under the
+ <code>filesystem</code> element. For instance:</p>
+
+<pre>
+<domainCapabilities>
+ ...
+ <devices>
+ <filesystem supported='yes'>
+ <enum name='driverType'>
+ <value>default</value>
+ <value>path</value>
+ <value>handle</value>
+ <value>virtiofs</value>
+ </enum>
+ </filesystem>
+ ...
+ </devices>
+</domainCapabilities>
+</pre>
+
+ <dl>
+ <dt><code>driverType</code></dt>
+ <dd>Options for the <code>type</code> attribute of the
+ <filesystem><driver> element.</dd>
+ </dl>
+
+
<h3><a id="elementsFeatures">Features</a></h3>
<p>One more set of XML elements describe the supported features and
diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
index 83d93ee494..fc668e0c78 100644
--- a/docs/schemas/domaincaps.rng
+++ b/docs/schemas/domaincaps.rng
@@ -182,6 +182,9 @@
<optional>
<ref name="rng"/>
</optional>
+ <optional>
+ <ref name="filesystem"/>
+ </optional>
</element>
</define>
@@ -220,6 +223,13 @@
</element>
</define>
+ <define name="filesystem">
+ <element name="filesystem">
+ <ref name="supported"/>
+ <ref name="enum"/>
+ </element>
+ </define>
+
<define name="features">
<element name="features">
<optional>
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index d0586362ae..cb90ae0176 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -524,6 +524,18 @@ virDomainCapsDeviceRNGFormat(virBuffer *buf,
}
+static void
+virDomainCapsDeviceFilesystemFormat(virBuffer *buf,
+ const virDomainCapsDeviceFilesystem *filesystem)
+{
+ FORMAT_PROLOGUE(filesystem);
+
+ ENUM_PROCESS(filesystem, driverType, virDomainFSDriverTypeToString);
+
+ FORMAT_EPILOGUE(filesystem);
+}
+
+
/**
* virDomainCapsFeatureGICFormat:
* @buf: target buffer
@@ -628,6 +640,7 @@ virDomainCapsFormat(const virDomainCaps *caps)
virDomainCapsDeviceVideoFormat(&buf, &caps->video);
virDomainCapsDeviceHostdevFormat(&buf, &caps->hostdev);
virDomainCapsDeviceRNGFormat(&buf, &caps->rng);
+ virDomainCapsDeviceFilesystemFormat(&buf, &caps->filesystem);
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</devices>\n");
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index 04be34765b..69e90893cc 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -113,6 +113,13 @@ struct _virDomainCapsDeviceRNG {
virDomainCapsEnum backendModel; /* virDomainRNGBackend */
};
+STATIC_ASSERT_ENUM(VIR_DOMAIN_FS_DRIVER_TYPE_LAST);
+typedef struct _virDomainCapsDeviceFilesystem virDomainCapsDeviceFilesystem;
+struct _virDomainCapsDeviceFilesystem {
+ virTristateBool supported;
+ virDomainCapsEnum driverType; /* virDomainFSDriverType */
+};
+
STATIC_ASSERT_ENUM(VIR_GIC_VERSION_LAST);
typedef struct _virDomainCapsFeatureGIC virDomainCapsFeatureGIC;
struct _virDomainCapsFeatureGIC {
@@ -194,6 +201,7 @@ struct _virDomainCaps {
virDomainCapsDeviceVideo video;
virDomainCapsDeviceHostdev hostdev;
virDomainCapsDeviceRNG rng;
+ virDomainCapsDeviceFilesystem filesystem;
/* add new domain devices here */
virDomainCapsFeatureGIC gic;
--
2.31.1