* Add simply lsm_pool_raid_info() by return unknown data. * Set LSM_CAP_POOL_RAID_INFO.
Signed-off-by: Gris Ge <f...@redhat.com> --- plugin/simc/simc_lsmplugin.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/plugin/simc/simc_lsmplugin.c b/plugin/simc/simc_lsmplugin.c index 422a064..aebcd4b 100644 --- a/plugin/simc/simc_lsmplugin.c +++ b/plugin/simc/simc_lsmplugin.c @@ -392,6 +392,7 @@ static int cap(lsm_plugin_ptr c, lsm_system *system, LSM_CAP_EXPORT_FS, LSM_CAP_EXPORT_REMOVE, LSM_CAP_VOLUME_RAID_INFO, + LSM_CAP_POOL_RAID_INFO, -1 ); @@ -980,8 +981,29 @@ static int volume_raid_info(lsm_plugin_ptr c, lsm_volume *volume, return rc; } +static int pool_raid_info( + lsm_plugin_ptr c, lsm_pool *pool, + lsm_volume_raid_type *raid_type, lsm_pool_member_type *member_type, + uint32_t *member_count, char **member_ids[], lsm_flag flags) +{ + int rc = LSM_ERR_OK; + struct plugin_data *pd = (struct plugin_data*)lsm_private_data_get(c); + lsm_pool *p = find_pool(pd, lsm_pool_id_get(pool)); + + if( !p) { + rc = lsm_log_error_basic(c, LSM_ERR_NOT_FOUND_POOL, + "Pool not found!"); + } + + *raid_type = LSM_VOLUME_RAID_TYPE_UNKNOWN; + *member_type = LSM_POOL_MEMBER_TYPE_UNKNOWN; + *member_count = 0; + return rc; +} + static struct lsm_ops_v1_2 ops_v1_2 = { - volume_raid_info + volume_raid_info, + pool_raid_info, }; static int volume_enable_disable(lsm_plugin_ptr c, lsm_volume *v, -- 1.8.3.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Libstoragemgmt-devel mailing list Libstoragemgmt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel