[Libvirt-cim] [PATCH] Add "disk" type storage pools
Richard Maciel
rmaciel at linux.vnet.ibm.com
Thu May 14 20:51:03 UTC 2009
+1
Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1242062614 25200
> # Node ID e08c78615c3ec653c2979b4619b15d48a1c56d48
> # Parent 3d42e1423d027c04c104ff0be6d99b86c46d1257
> Add "disk" type storage pools.
>
> This storage pool type is a disk backed pool, instead of being a file or
> directory backed pool.
>
> This is tricky to test - you'll need a free disk / partition that you can
> mount. I've tested this using a spare LVM partition.
>
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
>
> diff -r 3d42e1423d02 -r e08c78615c3e src/Virt_ResourcePoolConfigurationService.c
> --- a/src/Virt_ResourcePoolConfigurationService.c Mon Apr 27 17:05:48 2009 -0700
> +++ b/src/Virt_ResourcePoolConfigurationService.c Mon May 11 10:23:34 2009 -0700
> @@ -148,8 +148,8 @@
> pool->pool_info.disk.src_dir = NULL;
> }
>
> -static const char *disk_fs_pool(CMPIInstance *inst,
> - struct virt_pool *pool)
> +static const char *disk_fs_or_disk_pool(CMPIInstance *inst,
> + struct virt_pool *pool)
> {
> const char *val = NULL;
>
> @@ -195,19 +195,19 @@
> case DISK_POOL_DIR:
> break;
> case DISK_POOL_FS:
> - msg = disk_fs_pool(inst, pool);
> - if (msg != NULL)
> - goto out;
> + case DISK_POOL_DISK:
> + msg = disk_fs_or_disk_pool(inst, pool);
> break;
> case DISK_POOL_NETFS:
> msg = disk_netfs_pool(inst, pool);
> - if (msg != NULL)
> - goto out;
> break;
> default:
> return "Storage pool type not supported";
> }
>
> + if (msg != NULL)
> + goto out;
> +
> pool->pool_info.disk.pool_type = type;
>
> if (cu_get_str_prop(inst, "Path", &val) != CMPI_RC_OK)
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Richard Maciel, MSc
IBM Linux Technology Center
rmaciel at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list