Re: [PATCH v3 libvirt 1/3] conf: add <model> child element to <filesystem>

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> writes:

> From the XML pov, we shouldn't restrict use of <model> to only be
> for FS_TYPE_MOUNT. That is a QEMU driver implementation restriction,
> so just make the QEMU driver raise VIR_ERR_CONFIG_UNSUPPORTED for
> the cases we don't want, when building the CLI args

OK to amend this piece?  The QEMU driver supports only FS_TYPE_MOUNT so
the additional check seems reduntant there.

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 98dbe14..c897f1b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15806,10 +15806,6 @@ virDomainFSDefFormat(virBufferPtr buf,
     case VIR_DOMAIN_FS_TYPE_MOUNT:
         virBufferEscapeString(buf, "<source dir='%s'/>\n",
                               def->src);
-        if (def->model) {
-            virBufferEscapeString(buf, "<model type='%s'/>\n",
-                                  virDomainFSModelTypeToString(def->model));
-        }
         break;
 
     case VIR_DOMAIN_FS_TYPE_BIND:
@@ -15838,6 +15834,11 @@ virDomainFSDefFormat(virBufferPtr buf,
         break;
     }
 
+    if (def->model) {
+        virBufferEscapeString(buf, "<model type='%s'/>\n",
+                              virDomainFSModelTypeToString(def->model));
+    }
+
     virBufferEscapeString(buf, "<target dir='%s'/>\n",
                           def->dst);
 

Thanks,
Giuseppe

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]