[libvirt] [PATCH] Valid pool format type for logical volume pool should be auto and lvm2
John Ferlan
jferlan at redhat.com
Wed Jun 18 18:23:02 UTC 2014
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 at redhat.com>
> ---
> 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
More information about the libvir-list
mailing list