Re: [PATCH] Valid pool format type for logical volume pool should be auto and lvm2

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

 




On 06/18/2014 03:25 AM, Shanzhi Yu wrote:
> The logical volume pool supports formats auto and lvm2
> 
> Signed-off-by: Shanzhi Yu <shyu@xxxxxxxxxx>
> ---
>  src/conf/storage_conf.c | 2 +-
>  src/conf/storage_conf.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index 8b6fd79..3d61273 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -77,7 +77,7 @@ VIR_ENUM_IMPL(virStoragePoolFormatDisk,
>  
>  VIR_ENUM_IMPL(virStoragePoolFormatLogical,
>                VIR_STORAGE_POOL_LOGICAL_LAST,
> -              "unknown", "lvm2")
> +              "auto", "lvm2")
>  
>  
>  VIR_ENUM_IMPL(virStorageVolFormatDisk,
> diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h
> index 04d99eb..2b08ac5 100644
> --- a/src/conf/storage_conf.h
> +++ b/src/conf/storage_conf.h
> @@ -462,7 +462,7 @@ typedef enum {
>  VIR_ENUM_DECL(virStoragePoolFormatDisk)
>  
>  typedef enum {
> -    VIR_STORAGE_POOL_LOGICAL_UNKNOWN = 0,
> +    VIR_STORAGE_POOL_LOGICAL_AUTO = 0,
>      VIR_STORAGE_POOL_LOGICAL_LVM2 = 1,
>      VIR_STORAGE_POOL_LOGICAL_LAST,
>  } virStoragePoolFormatLogical;
> 

NACK

See http://libvirt.org/storage.html for details on how 'auto' is used.

Although not specifically called out for Logical Volume pools in the
documentation - it follows how other pools (filesystem and network
filesystem) use "auto".

Also remember how libvirt works - 'calloc' memory resulting in a
'default' of 0 (zero).  Without the presence of a "format type", it'll
be up to the pool code to determine what's there and what to default to.
There's only one format type for Logical Volume pools - so it's probably
fairly easy to guess what's in the pool...

John

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