"Daniel P. Berrange" <berrange(a)redhat.com> 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