Re: [PATCH v4 07/10] nfs: Add infrastructure to manage XML namespace options

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

 



On Thu, Jan 17, 2019 at 04:22:13PM -0500, John Ferlan wrote:
> Introduce the virStoragePoolNetFSMountOptionsDef to be used to
> manage the NFS Storage Pool XML Namespace for mount options.
> 
> Using a new virStorageBackendNamespaceInit function, set the
> virStoragePoolXMLNamespace into the _virStoragePoolOptions when
> the storage backend is loaded.
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/storage/storage_backend_fs.c | 128 +++++++++++++++++++++++++++++++
>  src/storage/storage_util.c       |  16 ++++
>  src/storage/storage_util.h       |  14 ++++
>  3 files changed, 158 insertions(+)

With one small nitpick below...

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>


> 
> diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
> index dc9869417e..b82215fcdb 100644
> --- a/src/storage/storage_backend_fs.c
> +++ b/src/storage/storage_backend_fs.c
> @@ -41,6 +41,7 @@ VIR_LOG_INIT("storage.storage_backend_fs");
>  
>  #if WITH_STORAGE_FS
>  
> +# include <libxml/xpathInternals.h>
>  # include <mntent.h>
>  
>  struct _virNetfsDiscoverState {
> @@ -559,6 +560,122 @@ virStorageBackendFileSystemBuild(virStoragePoolObjPtr pool,
>  }
>  
>  
> +#if WITH_STORAGE_FS
> +
> +# define STORAGE_POOL_NETFS_NAMESPACE_HREF "http://libvirt.org/schemas/storagepool/source/netfs/1.0";
> +
> +/* NetFS backend XML Namespace handling for nfs specific mount options to
> + * be added to the mount -o {options_list} command line. The XML will use
> + * the format, such as:
> + *
> + *     <netfs:mount_opts>
> + *       <netfs:option name='nodev'/>
> + *       <netfs:option name='nosuid'/>

I'd probably illustrate with different examples, given that those flags
are added by default

> + *     </netfs:mount_opts>
> + *
> + * and the <pool type='netfs'> is required to have a "xmlns:netfs='%s'"
> + * attribute using the STORAGE_POOL_NETFS_NAMESPACE_HREF
> + */

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

  Powered by Linux