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

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



On Wed, Aug 20, 2014 at 11:21:24AM +0200, Giuseppe Scrivano wrote:
> "Daniel P. Berrange" <berrange 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.

Yes, I see QEMU driver already has sufficient checks for this.

> 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);

ACK to the whole patch with this applied.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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