#include "libstoragemgmt_common.h"
#include "libstoragemgmt_accessgroups.h"
#include "libstoragemgmt_blockrange.h"
#include "libstoragemgmt_capabilities.h"
#include "libstoragemgmt_error.h"
#include "libstoragemgmt_fs.h"
#include "libstoragemgmt_nfsexport.h"
#include "libstoragemgmt_hash.h"
#include "libstoragemgmt_pool.h"
#include "libstoragemgmt_snapshot.h"
#include "libstoragemgmt_systems.h"
#include "libstoragemgmt_volumes.h"
#include "libstoragemgmt_disk.h"
Go to the source code of this file.
Data Structures | |
struct | lsm_mgmt_ops_v1 |
Callback functions for management operations. More... | |
struct | lsm_san_ops_v1 |
Block array oriented functions (callback functions) NOTE: This structure cannot change as we need to maintain backwards compatibility. More... | |
struct | lsm_fs_ops_v1 |
File system oriented functionality NOTE: This structure cannot change as we need to maintain backwards compatibility. More... | |
struct | lsm_nas_ops_v1 |
NAS system oriented functionality call back functions NOTE: This structure cannot change as we need to maintain backwards compatibility. More... | |
struct | lsm_ops_v1_2 |
Functions added in version 1.2 NOTE: This structure will change during the developement util version 1.2 released. More... | |
Defines | |
#define | LSM_ERROR_CREATE_PLUGIN_MSG(code, msg) lsm_error_create(code, msg, NULL, NULL, NULL, 0) |
#define | LSM_ERROR_CREATE_PLUGIN_EXCEPTION(code, msg, exception) lsm_error_create((code), (msg), (exception), NULL, NULL, 0) |
#define | LSM_ERROR_CREATE_PLUGIN_DEBUG(code, msg, exception, debug, debug_data, debug_len) |
Typedefs | |
typedef struct _lsm_plugin | lsm_plugin |
typedef lsm_plugin * | lsm_plugin_ptr |
typedef int(* | lsm_plugin_register )(lsm_plugin_ptr c, const char *uri, const char *password, uint32_t timeout, lsm_flag flags) |
typedef int(* | lsm_plugin_unregister )(lsm_plugin_ptr c, lsm_flag flags) |
typedef int(* | lsm_plug_tmo_set )(lsm_plugin_ptr c, uint32_t timeout, lsm_flag flags) |
typedef int(* | lsm_plug_tmo_get )(lsm_plugin_ptr c, uint32_t *timeout, lsm_flag flags) |
typedef int(* | lsm_plug_capabilities )(lsm_plugin_ptr c, lsm_system *sys, lsm_storage_capabilities **cap, lsm_flag flags) |
typedef int(* | lsm_plug_Job_status )(lsm_plugin_ptr c, const char *job, lsm_job_status *status, uint8_t *percent_complete, lsm_data_type *type, void **value, lsm_flag flags) |
typedef int(* | lsm_plug_job_free )(lsm_plugin_ptr c, char *job_id, lsm_flag flags) |
typedef int(* | lsm_plug_pool_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_pool **pool_array[], uint32_t *count, lsm_flag flags) |
typedef int(* | lsm_plug_system_list )(lsm_plugin_ptr c, lsm_system **systems[], uint32_t *system_count, lsm_flag flags) |
typedef int(* | lsm_plug_volume_list )(lsm_plugin_ptr c, const char *search_key, const char *search_val, lsm_volume **vol_array[], uint32_t *count, lsm_flag flags) |
typedef int(* | lsm_plug_disk_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_disk **disk_array[], uint32_t *count, lsm_flag flags) |
typedef int(* | lsm_plug_target_port_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_target_port **target_port_array[], uint32_t *count, lsm_flag flags) |
typedef int(* | lsm_plug_volume_create )(lsm_plugin_ptr c, lsm_pool *pool, const char *volume_name, uint64_t size, lsm_volume_provision_type provisioning, lsm_volume **new_volume, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_volume_replicate )(lsm_plugin_ptr c, lsm_pool *pool, lsm_replication_type rep_type, lsm_volume *volume_src, const char *name, lsm_volume **new_replicant, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_volume_replicate_range_block_size )(lsm_plugin_ptr c, lsm_system *system, uint32_t *bs, lsm_flag flags) |
typedef int(* | lsm_plug_volume_replicate_range )(lsm_plugin_ptr c, lsm_replication_type rep_type, lsm_volume *source, lsm_volume *dest, lsm_block_range **ranges, uint32_t num_ranges, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_volume_resize )(lsm_plugin_ptr c, lsm_volume *volume, uint64_t new_size, lsm_volume **resized_volume, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_volume_delete )(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_volume_enable )(lsm_plugin_ptr c, lsm_volume *v, lsm_flag flags) |
typedef int(* | lsm_plug_volume_disable )(lsm_plugin_ptr c, lsm_volume *v, lsm_flag flags) |
typedef int(* | lsm_plug_iscsi_chap_auth )(lsm_plugin_ptr c, const char *init_id, const char *in_user, const char *in_password, const char *out_user, const char *out_password, lsm_flag flags) |
typedef int(* | lsm_plug_access_group_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags) |
typedef int(* | lsm_plug_access_group_create )(lsm_plugin_ptr c, const char *name, const char *initiator_id, lsm_access_group_init_type init_type, lsm_system *system, lsm_access_group **access_group, lsm_flag flags) |
typedef int(* | lsm_plug_access_group_delete )(lsm_plugin_ptr c, lsm_access_group *group, lsm_flag flags) |
typedef int(* | lsm_plug_access_group_initiator_add )(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags) |
typedef int(* | lsm_plug_access_group_initiator_delete )(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags) |
typedef int(* | lsm_plug_volume_mask )(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags) |
typedef int(* | lsm_plug_volume_unmask )(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags) |
typedef int(* | lsm_plug_volumes_accessible_by_access_group )(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume **volumes[], uint32_t *count, lsm_flag flags) |
typedef int(* | lsm_plug_access_groups_granted_to_volume )(lsm_plugin_ptr c, lsm_volume *volume, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags) |
typedef int(* | lsm_plug_volume_child_dependency )(lsm_plugin_ptr c, lsm_volume *volume, uint8_t *yes, lsm_flag flags) |
typedef int(* | lsm_plug_volume_child_dependency_delete )(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_fs **fs[], uint32_t *fs_count, lsm_flag flags) |
typedef int(* | lsm_plug_fs_create )(lsm_plugin_ptr c, lsm_pool *pool, const char *name, uint64_t size_bytes, lsm_fs **fs, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_delete )(lsm_plugin_ptr c, lsm_fs *fs, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_clone )(lsm_plugin_ptr c, lsm_fs *src_fs, const char *dest_fs_name, lsm_fs **cloned_fs, lsm_fs_ss *optional_snapshot, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_child_dependency )(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, uint8_t *yes) |
typedef int(* | lsm_plug_fs_child_dependency_delete )(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_resize )(lsm_plugin_ptr c, lsm_fs *fs, uint64_t new_size_bytes, lsm_fs **rfs, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_file_clone )(lsm_plugin_ptr c, lsm_fs *fs, const char *src_file_name, const char *dest_file_name, lsm_fs_ss *snapshot, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_ss_list )(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss **ss[], uint32_t *ss_count, lsm_flag flags) |
typedef int(* | lsm_plug_fs_ss_create )(lsm_plugin_ptr c, lsm_fs *fs, const char *name, lsm_fs_ss **snapshot, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_ss_delete )(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_fs_ss_restore )(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, lsm_string_list *files, lsm_string_list *restore_files, int all_files, char **job, lsm_flag flags) |
typedef int(* | lsm_plug_nfs_auth_types )(lsm_plugin_ptr c, lsm_string_list **types, lsm_flag flags) |
typedef int(* | lsm_plug_nfs_list )(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_nfs_export **exports[], uint32_t *count, lsm_flag flags) |
typedef int(* | lsm_plug_nfs_export_fs )(lsm_plugin_ptr c, const char *fs_id, const char *export_path, lsm_string_list *root_list, lsm_string_list *rw_list, lsm_string_list *ro_list, uint64_t anon_uid, uint64_t anon_gid, const char *auth_type, const char *options, lsm_nfs_export **exported, lsm_flag flags) |
typedef int(* | lsm_plug_nfs_export_remove )(lsm_plugin_ptr c, lsm_nfs_export *e, lsm_flag flags) |
typedef int(* | lsm_plug_volume_raid_info )(lsm_plugin_ptr c, lsm_volume *volume, lsm_volume_raid_type *raid_type, uint32_t *strip_size, uint32_t *disk_count, uint32_t *min_io_size, uint32_t *opt_io_size, lsm_flag flags) |
typedef int(* | lsm_plug_pool_member_info )(lsm_plugin_ptr c, lsm_pool *pool, lsm_volume_raid_type *raid_type, lsm_pool_member_type *member_type, lsm_string_list **member_ids, lsm_flag flags) |
typedef int(* | lsm_plug_volume_raid_create_cap_get )(lsm_plugin_ptr c, lsm_system *system, uint32_t **supported_raid_types, uint32_t *supported_raid_type_count, uint32_t **supported_strip_sizes, uint32_t *supported_strip_size_count, lsm_flag flags) |
typedef int(* | lsm_plug_volume_raid_create )(lsm_plugin_ptr c, const char *name, lsm_volume_raid_type raid_type, lsm_disk *disks[], uint32_t disk_count, uint32_t strip_size, lsm_volume **new_volume, lsm_flag flags) |
Enumerations | |
enum | lsm_data_type { LSM_DATA_TYPE_UNKNOWN = -1, LSM_DATA_TYPE_NONE, LSM_DATA_TYPE_ACCESS_GROUP, LSM_DATA_TYPE_BLOCK_RANGE, LSM_DATA_TYPE_FS, LSM_DATA_TYPE_NFS_EXPORT, LSM_DATA_TYPE_POOL, LSM_DATA_TYPE_SS, LSM_DATA_TYPE_STRING_LIST, LSM_DATA_TYPE_SYSTEM, LSM_DATA_TYPE_VOLUME, LSM_DATA_TYPE_DISK } |
Functions | |
void LSM_DLL_EXPORT * | lsm_data_type_copy (lsm_data_type t, void *item) |
int LSM_DLL_EXPORT | lsm_plugin_init_v1 (int argc, char *argv[], lsm_plugin_register reg, lsm_plugin_unregister unreg, const char *desc, const char *version) |
int LSM_DLL_EXPORT | lsm_register_plugin_v1 (lsm_plugin_ptr plug, void *private_data, struct lsm_mgmt_ops_v1 *mgm_ops, struct lsm_san_ops_v1 *san_ops, struct lsm_fs_ops_v1 *fs_ops, struct lsm_nas_ops_v1 *nas_ops) |
int LSM_DLL_EXPORT | lsm_register_plugin_v1_2 (lsm_plugin_ptr plug, void *private_data, struct lsm_mgmt_ops_v1 *mgm_ops, struct lsm_san_ops_v1 *san_ops, struct lsm_fs_ops_v1 *fs_ops, struct lsm_nas_ops_v1 *nas_ops, struct lsm_ops_v1_2 *ops_v1_2) |
void LSM_DLL_EXPORT * | lsm_private_data_get (lsm_plugin_ptr plug) |
int LSM_DLL_EXPORT | lsm_log_error_basic (lsm_plugin_ptr plug, lsm_error_number code, const char *msg) |
int LSM_DLL_EXPORT | lsm_plugin_error_log (lsm_plugin_ptr plug, lsm_error_ptr error) |
lsm_error_ptr LSM_DLL_EXPORT | lsm_error_create (lsm_error_number code, const char *msg, const char *exception, const char *debug, const void *debug_data, uint32_t debug_data_size) |
lsm_pool LSM_DLL_EXPORT ** | lsm_pool_record_array_alloc (uint32_t size) |
void LSM_DLL_EXPORT | lsm_pool_free_space_set (lsm_pool *p, uint64_t free_space) |
lsm_pool LSM_DLL_EXPORT * | lsm_pool_record_alloc (const char *id, const char *name, uint64_t element_type, uint64_t unsupported_actions, uint64_t total_space, uint64_t free_space, uint64_t status, const char *status_info, const char *system_id, const char *plugin_data) |
const char LSM_DLL_EXPORT * | lsm_pool_plugin_data_get (lsm_pool *p) |
lsm_volume LSM_DLL_EXPORT ** | lsm_volume_record_array_alloc (uint32_t size) |
lsm_disk LSM_DLL_EXPORT ** | lsm_disk_record_array_alloc (uint32_t size) |
lsm_disk LSM_DLL_EXPORT * | lsm_disk_record_alloc (const char *id, const char *name, lsm_disk_type disk_type, uint64_t block_size, uint64_t block_count, uint64_t disk_status, const char *system_id) |
lsm_volume LSM_DLL_EXPORT * | lsm_volume_record_alloc (const char *id, const char *name, const char *vpd83, uint64_t block_size, uint64_t number_of_blocks, uint32_t status, const char *system_id, const char *pool_id, const char *plugin_data) |
const char LSM_DLL_EXPORT * | lsm_volume_plugin_data_get (lsm_volume *v) |
lsm_system LSM_DLL_EXPORT ** | lsm_system_record_array_alloc (uint32_t size) |
lsm_system LSM_DLL_EXPORT * | lsm_system_record_alloc (const char *id, const char *name, uint32_t status, const char *status_info, const char *plugin_data) |
const char LSM_DLL_EXPORT * | lsm_system_plugin_data_get (lsm_system *s) |
lsm_access_group LSM_DLL_EXPORT ** | lsm_access_group_record_array_alloc (uint32_t size) |
lsm_access_group LSM_DLL_EXPORT * | lsm_access_group_record_alloc (const char *id, const char *name, lsm_string_list *initiators, lsm_access_group_init_type init_type, const char *system_id, const char *plugin_data) |
void LSM_DLL_EXPORT | lsm_access_group_initiator_id_set (lsm_access_group *group, lsm_string_list *il) |
lsm_fs LSM_DLL_EXPORT * | lsm_fs_record_alloc (const char *id, const char *name, uint64_t total_space, uint64_t free_space, const char *pool_id, const char *system_id, const char *plugin_data) |
lsm_fs LSM_DLL_EXPORT ** | lsm_fs_record_array_alloc (uint32_t size) |
const char LSM_DLL_EXPORT * | lsm_fs_plugin_data_get (lsm_fs *fs) |
lsm_fs_ss LSM_DLL_EXPORT * | lsm_fs_ss_record_alloc (const char *id, const char *name, uint64_t ts, const char *plugin_data) |
lsm_fs_ss LSM_DLL_EXPORT ** | lsm_fs_ss_record_array_alloc (uint32_t size) |
const char LSM_DLL_EXPORT * | lsm_fs_ss_plugin_data_get (lsm_fs_ss *fs_ss) |
int LSM_DLL_EXPORT | lsm_capability_set (lsm_storage_capabilities *cap, lsm_capability_type t, lsm_capability_value_type v) |
int LSM_DLL_EXPORT | lsm_capability_set_n (lsm_storage_capabilities *cap, lsm_capability_value_type v,...) |
lsm_storage_capabilities LSM_DLL_EXPORT * | lsm_capability_record_alloc (char const *value) |
int LSM_DLL_EXPORT | lsm_uri_parse (const char *uri, char **scheme, char **user, char **server, int *port, char **path, lsm_hash **query_params) |
void LSM_DLL_EXPORT | lsm_plug_volume_search_filter (const char *search_key, const char *search_value, lsm_volume *vols[], uint32_t *count) |
void LSM_DLL_EXPORT | lsm_plug_pool_search_filter (const char *search_key, const char *search_value, lsm_pool *pools[], uint32_t *count) |
void LSM_DLL_EXPORT | lsm_plug_disk_search_filter (const char *search_key, const char *search_value, lsm_disk *disks[], uint32_t *count) |
void LSM_DLL_EXPORT | lsm_plug_access_group_search_filter (const char *search_key, const char *search_value, lsm_access_group *ag[], uint32_t *count) |
void LSM_DLL_EXPORT | lsm_plug_fs_search_filter (const char *search_key, const char *search_value, lsm_fs *fs[], uint32_t *count) |
void LSM_DLL_EXPORT | lsm_plug_nfs_export_search_filter (const char *search_key, const char *search_value, lsm_nfs_export *exports[], uint32_t *count) |
const char LSM_DLL_EXPORT * | lsm_nfs_export_plugin_data_get (lsm_nfs_export *exp) |
lsm_target_port LSM_DLL_EXPORT * | lsm_target_port_record_alloc (const char *id, lsm_target_port_type port_type, const char *service_address, const char *network_address, const char *physical_address, const char *physical_name, const char *system_id, const char *plugin_data) |
const char LSM_DLL_EXPORT * | lsm_target_port_plugin_data_get (lsm_target_port *tp) |
lsm_target_port LSM_DLL_EXPORT ** | lsm_target_port_record_array_alloc (uint32_t size) |
void LSM_DLL_EXPORT | lsm_plug_target_port_search_filter (const char *search_key, const char *search_value, lsm_target_port *tp[], uint32_t *count) |
Definition in file libstoragemgmt_plug_interface.h.
#define LSM_ERROR_CREATE_PLUGIN_DEBUG | ( | code, | |||
msg, | |||||
exception, | |||||
debug, | |||||
debug_data, | |||||
debug_len | ) |
lsm_error_create((code), (msg), (exception), (debug), \ (debug_data), debug_len)
Definition at line 1111 of file libstoragemgmt_plug_interface.h.
#define LSM_ERROR_CREATE_PLUGIN_EXCEPTION | ( | code, | |||
msg, | |||||
exception | ) | lsm_error_create((code), (msg), (exception), NULL, NULL, 0) |
Definition at line 1107 of file libstoragemgmt_plug_interface.h.
#define LSM_ERROR_CREATE_PLUGIN_MSG | ( | code, | |||
msg | ) | lsm_error_create(code, msg, NULL, NULL, NULL, 0) |
Plug-in macros for creating errors
Definition at line 1104 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_access_group_create)(lsm_plugin_ptr c, const char *name, const char *initiator_id, lsm_access_group_init_type init_type, lsm_system *system, lsm_access_group **access_group, lsm_flag flags) |
Creates an access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | name | Name of access group |
[in] | initiator_id | Initiator to be added to group |
[in] | id_type | Initiator type |
[in] | system | System to create group for |
[out] | access_group | Newly created access group |
[in] | flags | Reserved |
Definition at line 404 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_access_group_delete)(lsm_plugin_ptr c, lsm_access_group *group, lsm_flag flags) |
Deletes an access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | group | Access group to be deleted |
[in] | flags | Reserved |
Definition at line 415 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_access_group_initiator_add)(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags) |
Add an initiator to an access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | access_group | Group to add initiator to |
[in] | initiator_id | Initiator to add to group |
[in] | id_type | Initiator type |
[out] | updated_access_group | Updated access group |
[in] | flags | Reserved |
Definition at line 430 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_access_group_initiator_delete)(lsm_plugin_ptr c, lsm_access_group *access_group, const char *initiator_id, lsm_access_group_init_type id_type, lsm_access_group **updated_access_group, lsm_flag flags) |
Remove an initiator from an access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | access_group | Group to remove initiator from |
[in] | initiator_id | Initiator to remove |
[in] | id_type | Initiator type |
[out] | updated_access_group | Updated access group |
[in] | flags | Reserved |
Definition at line 445 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_access_group_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags) |
Retrieve a list of access groups, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | search_key | Field to search on |
[in] | search_value | Field value |
[out] | groups | Array of groups |
[out] | group_count | Number of groups |
[in] | flags | Reserved |
Definition at line 386 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_access_groups_granted_to_volume)(lsm_plugin_ptr c, lsm_volume *volume, lsm_access_group **groups[], uint32_t *group_count, lsm_flag flags) |
Retrieve a list of access groups that have access to the specified volume, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | volume | Volume to query |
[out] | groups | Array of access groups |
[out] | group_count | Number of access groups |
[in] | flags | Reserved |
Definition at line 501 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_capabilities)(lsm_plugin_ptr c, lsm_system *sys, lsm_storage_capabilities **cap, lsm_flag flags) |
Retrieve the plug-in capabilities callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | sys | System to interrogate |
[out] | cap | Capabilities |
[in] | flags | Reserved |
Definition at line 118 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_disk_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_disk **disk_array[], uint32_t *count, lsm_flag flags) |
Retrieve a list of volumes.
[in] | c | Valid lsm plug-in pointer |
[in] | search_key | Search key |
[in] | search_value | Search value |
[out] | disk_array | Array of disk pointers |
[out] | count | Number of disks |
[in] | flags | Reserved |
Definition at line 217 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_child_dependency)(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, uint8_t *yes) |
Determine if a file system has child dependencies, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system to check |
[in] | files | Specific files to check |
[out] | yes | Boolean |
Definition at line 592 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_child_dependency_delete)(lsm_plugin_ptr c, lsm_fs *fs, lsm_string_list *files, char **job, lsm_flag flags) |
Remove dependencies from a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system to remove dependencies for |
[in] | files | Specific files to remove dependencies for |
[out] | job | Job ID |
[out] | flags | Reserved |
Definition at line 606 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_clone)(lsm_plugin_ptr c, lsm_fs *src_fs, const char *dest_fs_name, lsm_fs **cloned_fs, lsm_fs_ss *optional_snapshot, char **job, lsm_flag flags) |
Clone a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | dest_fs_name | Clone fs name |
[out] | cloned_fs | New clone |
[in] | optional_snapshot | Basis of clone |
[out] | job | Job ID |
[in] | flags | reserved |
Definition at line 579 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_create)(lsm_plugin_ptr c, lsm_pool *pool, const char *name, uint64_t size_bytes, lsm_fs **fs, char **job, lsm_flag flags) |
Create a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | pool | Pool to create file system from |
[in] | name | Name of file system |
[in] | size_bytes | Size of the file system in bytes |
[out] | fs | Newly created file system |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 553 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_delete)(lsm_plugin_ptr c, lsm_fs *fs, char **job, lsm_flag flags) |
Delete a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system to delete |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 566 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_file_clone)(lsm_plugin_ptr c, lsm_fs *fs, const char *src_file_name, const char *dest_file_name, lsm_fs_ss *snapshot, char **job, lsm_flag flags) |
Clone an individual file on a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system which contains the file to clone |
[in] | src_file_name | Source file name and path |
[in] | dest_file_name | Destination file and path |
[in] | snapshot | Optional backing snapshot |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 638 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_fs **fs[], uint32_t *fs_count, lsm_flag flags) |
File system list, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | search_key | Search key |
[in] | search_value | Search value |
[out] | fs | An array of file systems |
[out] | fs_count | Number of file systems |
[in] | flags | Reserved |
Definition at line 536 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_resize)(lsm_plugin_ptr c, lsm_fs *fs, uint64_t new_size_bytes, lsm_fs **rfs, char **job, lsm_flag flags) |
Re-size a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system to re-size |
[in] | new_size_bytes | New size of file system |
[out] | rfs | Re-sized file system |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 622 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_ss_create)(lsm_plugin_ptr c, lsm_fs *fs, const char *name, lsm_fs_ss **snapshot, char **job, lsm_flag flags) |
Create a fs snapshot of the specified file system and optionally constrain it to a list of files, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system to create snapshot for |
[in] | name | Snap shot name |
[out] | snapshot | Newly created snapshot |
[out] | job | Job ID |
Definition at line 668 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_ss_delete)(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, char **job, lsm_flag flags) |
Delete a fs snapshot, callback function signature, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system to delete snapshot for |
[in] | ss | Snapshot to delete |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 682 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_ss_list)(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss **ss[], uint32_t *ss_count, lsm_flag flags) |
Retrieve a list of fs snapshots for a file system, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system |
[out] | ss | Array of snap shots |
[out] | ss_count | Count of snapshots |
[in] | flags | Reserved |
Definition at line 654 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_fs_ss_restore)(lsm_plugin_ptr c, lsm_fs *fs, lsm_fs_ss *ss, lsm_string_list *files, lsm_string_list *restore_files, int all_files, char **job, lsm_flag flags) |
Revert the state of a file system or specific files to a previous state, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs | File system of interest |
[in] | files | Optional list of files |
[in] | restore_files | Optional path and name of restored files |
[in] | all_files | boolean to indicate all files should be restored |
[out] | job | Job ID |
Definition at line 698 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_iscsi_chap_auth)(lsm_plugin_ptr c, const char *init_id, const char *in_user, const char *in_password, const char *out_user, const char *out_password, lsm_flag flags) |
Setup the cap authentication for the specified initiator, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | init_id | Initiator to set chap authentication for |
[in] | in_user | CHAP inbound username |
[in] | in_password | CHAP inbound password |
[in] | out_user | CHAP outbound user name |
[in] | out_password | CHAP outbound user name |
[in] | flags | Reserved |
Definition at line 368 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_job_free)(lsm_plugin_ptr c, char *job_id, lsm_flag flags) |
Instructs the plug-in to release the memory for the specified job id, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | job_id | Job ID to free memory for |
[in] | flags | Reserved |
Definition at line 147 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_Job_status)(lsm_plugin_ptr c, const char *job, lsm_job_status *status, uint8_t *percent_complete, lsm_data_type *type, void **value, lsm_flag flags) |
Retrieve the job status callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | job | Job identifier |
[out] | status | Enumerated value representing status |
[out] | percent_complete | How far completed |
[out] | type | Type of result |
[out] | value | Value of result |
[in] | flags | Reserved |
Definition at line 134 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_nfs_auth_types)(lsm_plugin_ptr c, lsm_string_list **types, lsm_flag flags) |
Get a list of NFS client authentication types, callback function signature
[in] | c | Valid lsm plug-in pointer |
[out] | types | List of authtication types |
[in] | flags | Reserved |
Definition at line 712 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_nfs_export_fs)(lsm_plugin_ptr c, const char *fs_id, const char *export_path, lsm_string_list *root_list, lsm_string_list *rw_list, lsm_string_list *ro_list, uint64_t anon_uid, uint64_t anon_gid, const char *auth_type, const char *options, lsm_nfs_export **exported, lsm_flag flags) |
Exports a file system via NFS, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | fs_id | File system id to export |
[in] | export_path | NFS export path |
[in] | root_list | List of servers with root access |
[in] | rw_list | List of servers with read/write access |
[in] | ro_list | List of servers with read only access |
[in] | anon_uid | UID to be mapped to anonymous |
[in] | anon_gid | GID to be mapped to anonymous |
[in] | auth_type | Client authentication type |
[in] | options | Options |
[out] | exported | Newly created export |
[in] | flags | Reserved |
Definition at line 747 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_nfs_export_remove)(lsm_plugin_ptr c, lsm_nfs_export *e, lsm_flag flags) |
Removes a NFS export, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | e | Export to remove |
[in] | flags | Reserved |
Definition at line 767 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_nfs_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_nfs_export **exports[], uint32_t *count, lsm_flag flags) |
Retrieve a list of NFS exports, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | search_key | Search key |
[in] | search_value | Search value |
[out] | exports | An array of exported file systems |
[out] | count | Number of exported file systems |
[in] | flags | Reserved |
Definition at line 726 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_pool_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_pool **pool_array[], uint32_t *count, lsm_flag flags) |
Retrieves a list of pools callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | search_key | Search key |
[in] | search_value | Search value |
[out] | pool_array | List of pools |
[out] | count | Number of items in array |
[in] | flags | Reserved |
Definition at line 160 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_pool_member_info)(lsm_plugin_ptr c, lsm_pool *pool, lsm_volume_raid_type *raid_type, lsm_pool_member_type *member_type, lsm_string_list **member_ids, lsm_flag flags) |
Retrieves the membership of given pool. New in version 1.2.
[in] | c | Valid lsm plug-in pointer |
[in] | pool | The lsm_pool ptr. |
[out] | raid_type | Enum of lsm_volume_raid_type. |
[out] | member_type | Enum of lsm_pool_member_type. |
[out] | member_ids | The pointer of lsm_string_list pointer. When 'member_type' is LSM_POOL_MEMBER_TYPE_POOL, the 'member_ids' will contain a list of parent Pool IDs. When 'member_type' is LSM_POOL_MEMBER_TYPE_DISK, the 'member_ids' will contain a list of disk IDs. When 'member_type' is LSM_POOL_MEMBER_TYPE_OTHER or LSM_POOL_MEMBER_TYPE_UNKNOWN, the member_ids should be NULL. |
[in] | flags | Reserved, set to 0 |
Definition at line 918 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_system_list)(lsm_plugin_ptr c, lsm_system **systems[], uint32_t *system_count, lsm_flag flags) |
Retrieve a list of systems, callback function signature
[in] | c | Valid lsm plug-in pointer |
[out] | systems | List of systems |
[out] | system_count | Number of systems |
[out] | flags | Reserved |
Definition at line 174 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_target_port_list)(lsm_plugin_ptr c, const char *search_key, const char *search_value, lsm_target_port **target_port_array[], uint32_t *count, lsm_flag flags) |
Retrieve a list of target ports.
[in] | c | Valid lsm plugin-in pointer |
[in] | search_key | Search key |
[in] | search_value | Search value |
[out] | target_port_array | Array of target port pointers |
[out] | count | Number of target ports |
[in] | flags | Reserved |
Definition at line 234 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_tmo_get)(lsm_plugin_ptr c, uint32_t *timeout, lsm_flag flags) |
Get the plug-in time-out value callback function signature
[in] | c | Valid lsm plug-in pointer |
[out] | timeout | Time-out value |
[in] | flags | Reserved |
Definition at line 107 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_tmo_set)(lsm_plugin_ptr c, uint32_t timeout, lsm_flag flags) |
Set plug-in time-out value callback function signature
c | Valid lsm plug-in pointer | |
timeout | timeout value in milliseconds | |
flags | Reserved |
Definition at line 97 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_child_dependency)(lsm_plugin_ptr c, lsm_volume *volume, uint8_t *yes, lsm_flag flags) |
Determine if a volume has child dependencies, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | volume | Volume to query |
[out] | yes | Boolean |
[in] | flags | Reserved |
Definition at line 513 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_child_dependency_delete)(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags) |
Remove dependencies from a volume, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | volume | Volume to remove dependency for |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 524 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_create)(lsm_plugin_ptr c, lsm_pool *pool, const char *volume_name, uint64_t size, lsm_volume_provision_type provisioning, lsm_volume **new_volume, char **job, lsm_flag flags) |
Creates a volume, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | pool | Pool to allocated storage from |
[in] | volume_name | Name of new volume |
[in] | size | Size of volume in bytes |
[in] | provisioning | How provisioned |
[out] | new_volume | Information on newly created volume |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 249 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_delete)(lsm_plugin_ptr c, lsm_volume *volume, char **job, lsm_flag flags) |
Delete a volume, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | volume | Volume to be deleted |
[out] | job | Job ID |
[in] | flags | Reserved |
Definition at line 333 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_disable)(lsm_plugin_ptr c, lsm_volume *v, lsm_flag flags) |
Take a volume offline, callback function signature.
[in] | c | Valid lsm plug-in pointer |
v | ||
flags |
Definition at line 353 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_enable)(lsm_plugin_ptr c, lsm_volume *v, lsm_flag flags) |
Place a volume online, callback function signature.
[in] | c | Valid lsm plug-in pointer |
[in] | v | Volume to place online |
[in] | flags | Reserved |
Definition at line 343 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_list)(lsm_plugin_ptr c, const char *search_key, const char *search_val, lsm_volume **vol_array[], uint32_t *count, lsm_flag flags) |
Retrieve a list of volumes.
[in] | c | Valid lsm plug-in pointer |
[in] | search_key | Search key |
[in] | search_value | Search value |
[out] | vol_array | Array of volumes |
[out] | count | Number of volumes |
[in] | flags | Reserved |
Definition at line 201 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_mask)(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags) |
Grants access to a volume for the specified access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | group | Group to be granted access |
[in] | volume | Volume to be given access too |
[in] | flags | Reserved |
Definition at line 458 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_raid_create)(lsm_plugin_ptr c, const char *name, lsm_volume_raid_type raid_type, lsm_disk *disks[], uint32_t disk_count, uint32_t strip_size, lsm_volume **new_volume, lsm_flag flags) |
Create a disk RAID pool and allocate entire full space to new volume. New in version 1.2, only available for hardware RAID cards.
[in] | c | Valid lsm plug-in pointer |
[in] | name | String. Name for the new volume. It might be ignored or altered on some hardwardware raid cards in order to fit their limitation. |
[in] | raid_type | Enum of lsm_volume_raid_type. |
[in] | disks | An array of lsm_disk types |
[in] | disk_count | The count of lsm_disk in 'disks' argument. |
[in] | strip_size | uint32_t. The strip size in bytes. |
[out] | new_volume | Newly created volume, Pointer to the lsm_volume type pointer. |
[in] | flags | Reserved, set to 0 |
Definition at line 972 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_raid_create_cap_get)(lsm_plugin_ptr c, lsm_system *system, uint32_t **supported_raid_types, uint32_t *supported_raid_type_count, uint32_t **supported_strip_sizes, uint32_t *supported_strip_size_count, lsm_flag flags) |
Query all supported RAID types and strip sizes which could be used in lsm_volume_raid_create() functions. New in version 1.2, only available for hardware RAID cards.
[in] | c | Valid lsm plug-in pointer |
[in] | system | The lsm_sys type. |
[out] | supported_raid_types | The pointer of uint32_t array. Containing lsm_volume_raid_type values. |
[out] | supported_raid_type_count | The pointer of uint32_t. Indicate the item count of supported_raid_types array. |
[out] | supported_strip_sizes | The pointer of uint32_t array. Containing all supported strip sizes. |
[out] | supported_strip_size_count | The pointer of uint32_t. Indicate the item count of supported_strip_sizes array. |
[in] | flags | Reserved, set to 0 |
Definition at line 947 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_raid_info)(lsm_plugin_ptr c, lsm_volume *volume, lsm_volume_raid_type *raid_type, uint32_t *strip_size, uint32_t *disk_count, uint32_t *min_io_size, uint32_t *opt_io_size, lsm_flag flags) |
Query the RAID information of a volume
[in] | c | Valid lsm plug-in pointer |
[in] | volume | Volume to be deleted |
[out] | raid_type | Enum of lsm_volume_raid_type |
[out] | strip_size | Size of the strip on each disk or other storage extent. |
[out] | disk_count | Count of of disks of RAID group(s) where this volume allocated from. |
[out] | min_io_size | Minimum I/O size, also the preferred I/O size of random I/O. |
[out] | opt_io_size | Optimal I/O size, also the preferred I/O size of sequential I/O. |
[in] | flags | Reserved |
Definition at line 888 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_replicate)(lsm_plugin_ptr c, lsm_pool *pool, lsm_replication_type rep_type, lsm_volume *volume_src, const char *name, lsm_volume **new_replicant, char **job, lsm_flag flags) |
Volume replicate, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | pool | Pool to allocated replicant from (optional) |
[in] | rep_type | Replication type |
[in] | volume_src | Source of the replication |
[in] | name | Name of newly replicated volume |
[out] | new_replicant | Newly replicated volume |
job | ||
flags |
Definition at line 269 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_replicate_range)(lsm_plugin_ptr c, lsm_replication_type rep_type, lsm_volume *source, lsm_volume *dest, lsm_block_range **ranges, uint32_t num_ranges, char **job, lsm_flag flags) |
Replicate a range of a volume to the same volume or different volume.
[in] | c | Valid lsm plug-in pointer |
[in] | rep_type | What type of replication |
[in] | source | Source of the replication |
[in] | dest | Destination of the replication, can be same as source |
[in] | ranges | An array of ranges |
[in] | num_ranges | Number of items in array |
[out] | job | Job ID |
flags |
Definition at line 301 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_replicate_range_block_size)(lsm_plugin_ptr c, lsm_system *system, uint32_t *bs, lsm_flag flags) |
Return the block size of a replicated block range.
[in] | c | Valid lsm plug-in pointer |
[in] | system | System to query against |
[out] | bs | Block size |
[out] | flags | Reserved |
Definition at line 286 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_resize)(lsm_plugin_ptr c, lsm_volume *volume, uint64_t new_size, lsm_volume **resized_volume, char **job, lsm_flag flags) |
Re-size a volume, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | volume | Volume to be re-sized |
[in] | new_size | New size of volume in bytes |
[in] | resized_volume | Information about newly re-sized volume |
[out] | job | The job ID |
[in] | flags | Reserved |
Definition at line 319 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volume_unmask)(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume *volume, lsm_flag flags) |
Revokes access to a volume for a specified access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | group | Group to revoke access for |
[in] | volume | Volume to which will no longer be accessible by group |
[in] | flags | Reserved |
Definition at line 472 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plug_volumes_accessible_by_access_group)(lsm_plugin_ptr c, lsm_access_group *group, lsm_volume **volumes[], uint32_t *count, lsm_flag flags) |
Retrieve an array of volumes which are accessible by access group, callback function signature
[in] | c | Valid lsm plug-in pointer |
[in] | group | Group to find volumes for |
[out] | volumes | Array of volumes |
[out] | count | Number of volumes |
[in] | flags | Reserved |
Definition at line 487 of file libstoragemgmt_plug_interface.h.
typedef struct _lsm_plugin lsm_plugin |
Opaque data type for plug-ins
Definition at line 62 of file libstoragemgmt_plug_interface.h.
typedef lsm_plugin* lsm_plugin_ptr |
Typedef for pointer type
Definition at line 67 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plugin_register)(lsm_plugin_ptr c, const char *uri, const char *password, uint32_t timeout, lsm_flag flags) |
Plug-in register callback function signature.
c | Valid lsm plugin pointer | |
uri | Connection URI | |
password | Plain text password | |
timeout | Plug-in timeout to array | |
flags | Reserved |
Definition at line 78 of file libstoragemgmt_plug_interface.h.
typedef int(* lsm_plugin_unregister)(lsm_plugin_ptr c, lsm_flag flags) |
Plug-in unregister callback function signature
Definition at line 88 of file libstoragemgmt_plug_interface.h.
enum lsm_data_type |
What type of data structure we have
Definition at line 44 of file libstoragemgmt_plug_interface.h.
void LSM_DLL_EXPORT lsm_access_group_initiator_id_set | ( | lsm_access_group * | group, | |
lsm_string_list * | il | |||
) |
Use to change the list of initiators associated with an access group.
group | Access group to change initiators for | |
il | String list of initiators. |
lsm_access_group LSM_DLL_EXPORT* lsm_access_group_record_alloc | ( | const char * | id, | |
const char * | name, | |||
lsm_string_list * | initiators, | |||
lsm_access_group_init_type | init_type, | |||
const char * | system_id, | |||
const char * | plugin_data | |||
) |
Allocates storage for single Access_group
id | ID of access group | |
name | Name of access group | |
initiators | List of initiators, can be NULL | |
init_type | Initiator group type | |
system_id | System id | |
plugin_data | Reserved for plug-in use only |
lsm_access_group LSM_DLL_EXPORT** lsm_access_group_record_array_alloc | ( | uint32_t | size | ) |
Allocates storage for Access_group array
size | Number of elements to store. |
lsm_storage_capabilities LSM_DLL_EXPORT* lsm_capability_record_alloc | ( | char const * | value | ) |
Allocated storage for capabilities
value | Set to NULL, used during serialization otherwise. |
int LSM_DLL_EXPORT lsm_capability_set | ( | lsm_storage_capabilities * | cap, | |
lsm_capability_type | t, | |||
lsm_capability_value_type | v | |||
) |
Set a capability
cap | Valid capability pointer | |
t | Which capability to set | |
v | Value of the capability |
int LSM_DLL_EXPORT lsm_capability_set_n | ( | lsm_storage_capabilities * | cap, | |
lsm_capability_value_type | v, | |||
... | ||||
) |
Sets 1 or more capabilities with the same value v
cap | Valid capability pointer | |
v | The value to set capabilities to | |
... | Which capabilites to set (Make sure to terminate list with a -1) |
void LSM_DLL_EXPORT* lsm_data_type_copy | ( | lsm_data_type | t, | |
void * | item | |||
) |
Copies the memory pointed to by item with given type t.
t | Type of item to copy | |
item | Pointer to src |
Definition at line 56 of file lsm_plugin_ipc.cpp.
lsm_disk LSM_DLL_EXPORT* lsm_disk_record_alloc | ( | const char * | id, | |
const char * | name, | |||
lsm_disk_type | disk_type, | |||
uint64_t | block_size, | |||
uint64_t | block_count, | |||
uint64_t | disk_status, | |||
const char * | system_id | |||
) |
Allocate a disk record.
id | Identification | |
name | Human readable name | |
disk_type | Enumerated disk type | |
block_size | Number of bytes per logical block | |
block_count | Number of blocks for disk | |
disk_status | Status | |
system_id | System id this disk resides in |
lsm_disk LSM_DLL_EXPORT** lsm_disk_record_array_alloc | ( | uint32_t | size | ) |
Allocate the storage needed for tan array of disk records.
size | Number of elements |
lsm_error_ptr LSM_DLL_EXPORT lsm_error_create | ( | lsm_error_number | code, | |
const char * | msg, | |||
const char * | exception, | |||
const char * | debug, | |||
const void * | debug_data, | |||
uint32_t | debug_data_size | |||
) |
Creates an error record.
code | ||
msg | ||
exception | ||
debug | ||
debug_data | ||
debug_data_size |
Definition at line 335 of file lsm_datatypes.cpp.
const char LSM_DLL_EXPORT* lsm_fs_plugin_data_get | ( | lsm_fs * | fs | ) |
Used to retrieve the plug-in private data for a specific pool
fs | FS to retrieve plug-in private data for |
lsm_fs LSM_DLL_EXPORT* lsm_fs_record_alloc | ( | const char * | id, | |
const char * | name, | |||
uint64_t | total_space, | |||
uint64_t | free_space, | |||
const char * | pool_id, | |||
const char * | system_id, | |||
const char * | plugin_data | |||
) |
Allocates memory for a file system record
id | ID of file system | |
name | Name of file system | |
total_space | Total space | |
free_space | Free space | |
pool_id | Pool id | |
system_id | System id | |
plugin_data | Reserved for plug-in use only |
lsm_fs LSM_DLL_EXPORT** lsm_fs_record_array_alloc | ( | uint32_t | size | ) |
Allocates the memory for the array of file system records.
size | Number of elements |
const char LSM_DLL_EXPORT* lsm_fs_ss_plugin_data_get | ( | lsm_fs_ss * | fs_ss | ) |
Retrieve private data from fs_ss.
fs_ss | Valid fs_ss record |
lsm_fs_ss LSM_DLL_EXPORT* lsm_fs_ss_record_alloc | ( | const char * | id, | |
const char * | name, | |||
uint64_t | ts, | |||
const char * | plugin_data | |||
) |
Allocates the memory for single snap shot record.
id | ID | |
name | Name | |
ts | Epoch time stamp when snapshot was created | |
plugin_data | Private plugin data |
lsm_fs_ss LSM_DLL_EXPORT** lsm_fs_ss_record_array_alloc | ( | uint32_t | size | ) |
Allocates the memory for an array of snapshot records.
size | Number of elements |
int LSM_DLL_EXPORT lsm_log_error_basic | ( | lsm_plugin_ptr | plug, | |
lsm_error_number | code, | |||
const char * | msg | |||
) |
Logs an error with the plug-in
plug | Plug-in pointer | |
code | Error code to return | |
msg | String message |
Definition at line 2489 of file lsm_plugin_ipc.cpp.
const char LSM_DLL_EXPORT* lsm_nfs_export_plugin_data_get | ( | lsm_nfs_export * | exp | ) |
Retrieve private data from nfs export record.
exp | Valid nfs export record |
void LSM_DLL_EXPORT lsm_plug_access_group_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_access_group * | ag[], | |||
uint32_t * | count | |||
) |
Provides for access group filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | ag | Array to filter |
[in,out] | count | Number of access groups to filter, number remain |
Definition at line 2736 of file lsm_plugin_ipc.cpp.
void LSM_DLL_EXPORT lsm_plug_disk_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_disk * | disks[], | |||
uint32_t * | count | |||
) |
Provides for disk filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | disks | Array to filter |
[in,out] | count | Number of disks to filter, number remain |
Definition at line 2708 of file lsm_plugin_ipc.cpp.
void LSM_DLL_EXPORT lsm_plug_fs_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_fs * | fs[], | |||
uint32_t * | count | |||
) |
Provides for fs filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | fs | Array to filter |
[in,out] | count | Number of file systems to filter, number remain |
Definition at line 2763 of file lsm_plugin_ipc.cpp.
void LSM_DLL_EXPORT lsm_plug_nfs_export_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_nfs_export * | exports[], | |||
uint32_t * | count | |||
) |
Provides for nfs filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | exports | Array to filter |
[in,out] | count | Number of nfs exports to filter, number remain |
Definition at line 2789 of file lsm_plugin_ipc.cpp.
void LSM_DLL_EXPORT lsm_plug_pool_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_pool * | pools[], | |||
uint32_t * | count | |||
) |
Provides for pool filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | pools | Array to filter |
[in,out] | count | Number of pools to filter, number remain |
Definition at line 2682 of file lsm_plugin_ipc.cpp.
void LSM_DLL_EXPORT lsm_plug_target_port_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_target_port * | tp[], | |||
uint32_t * | count | |||
) |
Provides for target port filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | tp | Array to filter |
[in,out] | count | Number of target ports to filter, number remain |
void LSM_DLL_EXPORT lsm_plug_volume_search_filter | ( | const char * | search_key, | |
const char * | search_value, | |||
lsm_volume * | vols[], | |||
uint32_t * | count | |||
) |
Provides for volume filtering when an array doesn't support this natively. Note: Filters in place removing and freeing those that don't match.
search_key | Search field | |
search_value | Search value | |
[in,out] | vols | Array to filter |
[in,out] | count | Number of volumes to filter, number remain |
Definition at line 2654 of file lsm_plugin_ipc.cpp.
int LSM_DLL_EXPORT lsm_plugin_error_log | ( | lsm_plugin_ptr | plug, | |
lsm_error_ptr | error | |||
) |
Return an error with the plug-in
plug | Opaque plug-in | |
error | Error to associate. |
Definition at line 2510 of file lsm_plugin_ipc.cpp.
int LSM_DLL_EXPORT lsm_plugin_init_v1 | ( | int | argc, | |
char * | argv[], | |||
lsm_plugin_register | reg, | |||
lsm_plugin_unregister | unreg, | |||
const char * | desc, | |||
const char * | version | |||
) |
Initializes the plug-in.
argc | Command line argument count | |
argv | Command line arguments | |
reg | Registration function | |
unreg | Un-Registration function | |
desc | Plug-in description | |
version | Plug-in version |
Definition at line 267 of file lsm_plugin_ipc.cpp.
void LSM_DLL_EXPORT lsm_pool_free_space_set | ( | lsm_pool * | p, | |
uint64_t | free_space | |||
) |
Used to set the free space on a pool record
p | Pool to modify | |
free_space | New free space value |
Definition at line 522 of file lsm_datatypes.cpp.
const char LSM_DLL_EXPORT* lsm_pool_plugin_data_get | ( | lsm_pool * | p | ) |
Used to retrieve the plugin-private data for a specfic pool
p | Pool to retrieve plugin private data for |
lsm_pool LSM_DLL_EXPORT* lsm_pool_record_alloc | ( | const char * | id, | |
const char * | name, | |||
uint64_t | element_type, | |||
uint64_t | unsupported_actions, | |||
uint64_t | total_space, | |||
uint64_t | free_space, | |||
uint64_t | status, | |||
const char * | status_info, | |||
const char * | system_id, | |||
const char * | plugin_data | |||
) |
Helper function to allocate a pool record.
id | System unique identifier | |
name | Human readable name | |
element_type | A bit field which states what the pool can be used to create | |
unsupported_actions | Things you cannot do with this pool | |
total_space | Total space | |
free_space | Space available | |
status | Pool status, bit field (See LSM_POOL_STATUS_XXXX constants) | |
status_info | Additional textual information on status | |
system_id | System id | |
plugin_data | Reserved for plugin writer use |
Definition at line 489 of file lsm_datatypes.cpp.
lsm_pool LSM_DLL_EXPORT** lsm_pool_record_array_alloc | ( | uint32_t | size | ) |
Helper function to create an array of lsm_pool *
size | Number of elements |
void LSM_DLL_EXPORT* lsm_private_data_get | ( | lsm_plugin_ptr | plug | ) |
Used to retrieve private data for plug-in operation.
plug | Opaque plug-in pointer. |
Definition at line 144 of file lsm_plugin_ipc.cpp.
int LSM_DLL_EXPORT lsm_register_plugin_v1 | ( | lsm_plugin_ptr | plug, | |
void * | private_data, | |||
struct lsm_mgmt_ops_v1 * | mgm_ops, | |||
struct lsm_san_ops_v1 * | san_ops, | |||
struct lsm_fs_ops_v1 * | fs_ops, | |||
struct lsm_nas_ops_v1 * | nas_ops | |||
) |
Used to register all the data needed for the plug-in operation.
plug | Pointer provided by the framework | |
private_data | Private data to be used for whatever the plug-in needs | |
mgm_ops | Function pointers for management operations | |
san_ops | Function pointers for SAN operations | |
fs_ops | Function pointers for file system operations | |
nas_ops | Function pointers for NAS operations |
Definition at line 107 of file lsm_plugin_ipc.cpp.
int LSM_DLL_EXPORT lsm_register_plugin_v1_2 | ( | lsm_plugin_ptr | plug, | |
void * | private_data, | |||
struct lsm_mgmt_ops_v1 * | mgm_ops, | |||
struct lsm_san_ops_v1 * | san_ops, | |||
struct lsm_fs_ops_v1 * | fs_ops, | |||
struct lsm_nas_ops_v1 * | nas_ops, | |||
struct lsm_ops_v1_2 * | ops_v1_2 | |||
) |
Used to register version 1.2 APIs plug-in operation.
plug | Pointer provided by the framework | |
private_data | Private data to be used for whatever the plug-in needs | |
mgm_ops | Function pointers for struct lsm_mgmt_ops_v1 | |
san_ops | Function pointers for struct lsm_san_ops_v1 | |
fs_ops | Function pointers for struct lsm_fs_ops_v1 | |
nas_ops | Function pointers for struct lsm_nas_ops_v1 | |
ops_v1_2 | Function pointers for struct lsm_ops_v1_2 |
Definition at line 127 of file lsm_plugin_ipc.cpp.
const char LSM_DLL_EXPORT* lsm_system_plugin_data_get | ( | lsm_system * | s | ) |
lsm_system LSM_DLL_EXPORT* lsm_system_record_alloc | ( | const char * | id, | |
const char * | name, | |||
uint32_t | status, | |||
const char * | status_info, | |||
const char * | plugin_data | |||
) |
Allocates the storage for one system record.
[in] | id | Id |
[in] | name | System name (human readable) |
[in] | status | Status of the system |
[in] | status_info | Additional text for status |
[in] | plugin_data | Private plugin data |
lsm_system LSM_DLL_EXPORT** lsm_system_record_array_alloc | ( | uint32_t | size | ) |
Allocate the storage needed for and array of System records.
size | Number of elements. |
const char LSM_DLL_EXPORT* lsm_target_port_plugin_data_get | ( | lsm_target_port * | tp | ) |
Retrieve the plug-in private data pointer
tp | Valid target port pointer |
lsm_target_port LSM_DLL_EXPORT* lsm_target_port_record_alloc | ( | const char * | id, | |
lsm_target_port_type | port_type, | |||
const char * | service_address, | |||
const char * | network_address, | |||
const char * | physical_address, | |||
const char * | physical_name, | |||
const char * | system_id, | |||
const char * | plugin_data | |||
) |
Allocate a target port
id | ID of target port | |
port_type | Port type | |
service_address | Service address | |
network_address | Network Address | |
physical_address | Physical address | |
physical_name | Physical name | |
system_id | System ID | |
plugin_data | Plug-in data |
lsm_target_port LSM_DLL_EXPORT** lsm_target_port_record_array_alloc | ( | uint32_t | size | ) |
Allocated an array of target pointers
size | Number of pointers to store |
int LSM_DLL_EXPORT lsm_uri_parse | ( | const char * | uri, | |
char ** | scheme, | |||
char ** | user, | |||
char ** | server, | |||
int * | port, | |||
char ** | path, | |||
lsm_hash ** | query_params | |||
) |
Convenience function for plug-in writer. Note: Make sure to free returned items to prevent memory leaks.
[in] | uri | URI to parse |
[out] | scheme | returned scheme |
[out] | user | returned user |
[out] | server | returned server |
[out] | port | returned port |
[out] | path | returned path |
[out] | query_params | returned query params |
Definition at line 2537 of file lsm_plugin_ipc.cpp.
const char LSM_DLL_EXPORT* lsm_volume_plugin_data_get | ( | lsm_volume * | v | ) |
Retrieve the private plug-in data from the volume record.
v | Volume pointer |
lsm_volume LSM_DLL_EXPORT* lsm_volume_record_alloc | ( | const char * | id, | |
const char * | name, | |||
const char * | vpd83, | |||
uint64_t | block_size, | |||
uint64_t | number_of_blocks, | |||
uint32_t | status, | |||
const char * | system_id, | |||
const char * | pool_id, | |||
const char * | plugin_data | |||
) |
Allocated the storage needed for one volume record.
id | ID | |
name | Name | |
vpd83 | SCSI vpd 83 id | |
block_size | Volume block size | |
number_of_blocks | Volume number of blocks | |
status | Volume status | |
system_id | System id | |
pool_id | Pool id this volume is created from | |
plugin_data | Private data for plugin use |
lsm_volume LSM_DLL_EXPORT** lsm_volume_record_array_alloc | ( | uint32_t | size | ) |
Allocate the storage needed for and array of Volume records.
size | Number of elements. |