Re: [PATCH] test: storage: Fill in default vol types for every pool

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

 



On Thu, 2019-03-07 at 14:35 -0500, Cole Robinson wrote:
> @@ -5164,13 +5164,26 @@ testStorageVolDelete(virStorageVolPtr vol,
>  static int
>  testStorageVolumeTypeForPool(int pooltype)
>  {
> -    switch (pooltype) {
> -        case VIR_STORAGE_POOL_DIR:
> -        case VIR_STORAGE_POOL_FS:
> -        case VIR_STORAGE_POOL_NETFS:
> -            return VIR_STORAGE_VOL_FILE;
> -        default:
> -            return VIR_STORAGE_VOL_BLOCK;
> +    switch ((virStoragePoolType) pooltype) {
> +    case VIR_STORAGE_POOL_DIR:
> +    case VIR_STORAGE_POOL_FS:
> +    case VIR_STORAGE_POOL_NETFS:
> +    case VIR_STORAGE_POOL_VSTORAGE:
> +        return VIR_STORAGE_VOL_FILE;
> +    case VIR_STORAGE_POOL_SHEEPDOG:
> +    case VIR_STORAGE_POOL_ISCSI_DIRECT:
> +    case VIR_STORAGE_POOL_GLUSTER:
> +    case VIR_STORAGE_POOL_RBD:
> +        return VIR_STORAGE_VOL_NETWORK;
> +    case VIR_STORAGE_POOL_LOGICAL:
> +    case VIR_STORAGE_POOL_DISK:
> +    case VIR_STORAGE_POOL_MPATH:
> +    case VIR_STORAGE_POOL_ISCSI:
> +    case VIR_STORAGE_POOL_SCSI:
> +    case VIR_STORAGE_POOL_ZFS:

Surely VIR_STORAGE_VOL_BLOCK should be returned here...

> +    case VIR_STORAGE_POOL_LAST:
> +    default:
> +        return VIR_STORAGE_VOL_BLOCK;
>      }

... and these last two would result in virReportEnumRangeError()
being called?


I won't comment on the actual change since it's out of my area of
expertise, though it looks sane enough from where I'm standing.

-- 
Andrea Bolognani / Red Hat / Virtualization

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