[libvirt PATCH 2/3] qemu: extend filesystem XML validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reject readonly argument for virtiofs and quotas for all filesystems.

https://issues.redhat.com/browse/RHEL-4994
https://issues.redhat.com/browse/RHEL-4432

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_validate.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 8d2927af60..f02ed4d44e 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -4264,6 +4264,13 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs,
                        _("only supports mount filesystem type"));
         return -1;
     }
+
+    if (fs->space_hard_limit > 0 || space_soft_limit > 0) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                       _("filesystem usage limits are not supported with QEMU"));
+        return -1;
+    }
+
     if (fs->multidevs != VIR_DOMAIN_FS_MULTIDEVS_DEFAULT &&
         !virQEMUCapsGet(qemuCaps, QEMU_CAPS_FSDEV_MULTIDEVS)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -4330,6 +4337,12 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs,
             }
         }
 
+        if (fs->readonly) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("virtiofs does not support read-only access"));
+            return -1;
+        }
+
         if (fs->model != VIR_DOMAIN_FS_MODEL_DEFAULT) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                            _("virtiofs does not support model"));
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux