Motr
M0
|
Data Structures | |
struct | m0_spiel_repreb_status |
struct | m0_spiel_sns_status |
struct | m0_spiel |
struct | m0_spiel_tx |
struct | m0_spiel_service_info |
struct | m0_spiel_running_svc |
struct | m0_spiel_bckey |
struct | m0_spiel_bcrec |
struct | m0_proc_counter |
struct | m0_fs_stats |
Enumerations | |
enum | m0_repreb_type { M0_REPREB_TYPE_SNS, M0_REPREB_TYPE_DIX, M0_REPREB_TYPE_NR } |
Functions | |
int | m0_spiel_init (struct m0_spiel *spiel, struct m0_reqh *reqh) |
void | m0_spiel_fini (struct m0_spiel *spiel) |
void | m0_spiel_tx_open (struct m0_spiel *spiel, struct m0_spiel_tx *tx) |
void | m0_spiel_tx_close (struct m0_spiel_tx *tx) |
int | m0_spiel_tx_commit (struct m0_spiel_tx *tx) |
int | m0_spiel_tx_commit_forced (struct m0_spiel_tx *tx, bool forced, uint64_t ver_forced, uint32_t *rquorum) |
int | m0_spiel_root_add (struct m0_spiel_tx *tx, const struct m0_fid *rootfid, const struct m0_fid *mdpool, const struct m0_fid *imeta_pver, uint32_t mdredundancy, const char **params) |
int | m0_spiel_node_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, uint32_t memsize, uint32_t nr_cpu, uint64_t last_state, uint64_t flags) |
int | m0_spiel_process_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, struct m0_bitmap *cores, uint64_t memlimit_as, uint64_t memlimit_rss, uint64_t memlimit_stack, uint64_t memlimit_memlock, const char *endpoint) |
int | m0_spiel_service_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_spiel_service_info *service_info) |
int | m0_spiel_device_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *drive, uint32_t dev_idx, enum m0_cfg_storage_device_interface_type iface, enum m0_cfg_storage_device_media_type media, uint32_t bsize, uint64_t size, uint64_t last_state, uint64_t flags, const char *filename) |
int | m0_spiel_site_add (struct m0_spiel_tx *tx, const struct m0_fid *fid) |
int | m0_spiel_rack_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent) |
int | m0_spiel_enclosure_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *node) |
int | m0_spiel_controller_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent) |
int | m0_spiel_drive_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent) |
int | m0_spiel_pool_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, uint32_t pver_policy) |
int | m0_spiel_pver_actual_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_pdclust_attr *attrs, uint32_t *tolerance, uint32_t tolerance_len) |
int | m0_spiel_pver_formulaic_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, uint32_t index, const struct m0_fid *base_pver, uint32_t *allowance, uint32_t allowance_len) |
int | m0_spiel_site_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real) |
int | m0_spiel_rack_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real) |
int | m0_spiel_enclosure_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real) |
int | m0_spiel_controller_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real) |
int | m0_spiel_drive_v_add (struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent, const struct m0_fid *real) |
int | m0_spiel_pool_version_done (struct m0_spiel_tx *tx, const struct m0_fid *fid) |
int | m0_spiel_profile_add (struct m0_spiel_tx *tx, const struct m0_fid *fid) |
int | m0_spiel_profile_pool_add (struct m0_spiel_tx *tx, const struct m0_fid *profile, const struct m0_fid *pool) |
int | m0_spiel_element_del (struct m0_spiel_tx *tx, const struct m0_fid *fid) |
int | m0_spiel_tx_validate (struct m0_spiel_tx *tx) |
int | m0_spiel_tx_to_str (struct m0_spiel_tx *tx, uint64_t ver_forced, char **str) |
void | m0_spiel_tx_str_free (char *str) |
int | m0_spiel_tx_dump (struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename) |
int | m0_spiel_tx_dump_debug (struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename) |
int | m0_spiel_rconfc_start (struct m0_spiel *spiel, m0_rconfc_cb_t expired_cb) |
void | m0_spiel_rconfc_stop (struct m0_spiel *spiel) |
int | m0_spiel_cmd_profile_set (struct m0_spiel *spiel, const char *profile_str) |
int | m0_spiel_service_init (struct m0_spiel *spl, const struct m0_fid *svc_fid) |
int | m0_spiel_service_start (struct m0_spiel *spl, const struct m0_fid *svc_fid) |
int | m0_spiel_service_stop (struct m0_spiel *spl, const struct m0_fid *svc_fid) |
int | m0_spiel_service_health (struct m0_spiel *spl, const struct m0_fid *svc_fid) |
int | m0_spiel_service_status (struct m0_spiel *spl, const struct m0_fid *svc_fid, int *status) |
int | m0_spiel_service_quiesce (struct m0_spiel *spl, const struct m0_fid *svc_fid) |
int | m0_spiel_device_attach (struct m0_spiel *spl, const struct m0_fid *dev_fid) |
int | m0_spiel_device_attach_state (struct m0_spiel *spl, const struct m0_fid *dev_fid, uint32_t *ha_state) |
int | m0_spiel_device_detach (struct m0_spiel *spl, const struct m0_fid *dev_fid) |
int | m0_spiel_device_format (struct m0_spiel *spl, const struct m0_fid *dev_fid) |
int | m0_spiel_process_stop (struct m0_spiel *spl, const struct m0_fid *proc_fid) |
int | m0_spiel_process_reconfig (struct m0_spiel *spl, const struct m0_fid *proc_fid) |
int | m0_spiel_process_health (struct m0_spiel *spl, const struct m0_fid *proc_fid) |
int | m0_spiel_process_quiesce (struct m0_spiel *spl, const struct m0_fid *proc_fid) |
int | m0_spiel_process_list_services (struct m0_spiel *spl, const struct m0_fid *proc_fid, struct m0_spiel_running_svc **services) |
int | m0_spiel_process_lib_load (struct m0_spiel *spl, const struct m0_fid *proc_fid, const char *libname) |
int | m0_spiel_sns_repair_start (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_repair_start (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_repair_start (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_sns_repair_continue (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_repair_continue (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_repair_continue (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_sns_repair_quiesce (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_repair_quiesce (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_repair_quiesce (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_sns_repair_abort (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_repair_abort (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_repair_abort (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_sns_repair_status (struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses) |
int | m0_spiel_dix_repair_status (struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses) |
int | m0_spiel_pool_repair_status (struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_sns_status **statuses) |
int | m0_spiel_sns_rebalance_start (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_rebalance_start (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_rebalance_start (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_node_direct_rebalance_start (struct m0_spiel *spl, const struct m0_fid *node) |
int | m0_spiel_sns_rebalance_continue (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_rebalance_continue (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_rebalance_continue (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_sns_rebalance_quiesce (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_rebalance_quiesce (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_rebalance_quiesce (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_sns_rebalance_status (struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses) |
int | m0_spiel_dix_rebalance_status (struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses) |
int | m0_spiel_pool_rebalance_status (struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_sns_status **statuses) |
int | m0_spiel_sns_rebalance_abort (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_dix_rebalance_abort (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_pool_rebalance_abort (struct m0_spiel *spl, const struct m0_fid *pool_fid) |
int | m0_spiel_proc_counters_fetch (struct m0_spiel *spl, struct m0_fid *proc_fid, struct m0_proc_counter *count_stats) |
int | m0_spiel_filesystem_stats_fetch (struct m0_spiel *spl, struct m0_fs_stats *stats) |
M0_INTERNAL int | m0_spiel__fs_stats_fetch (struct m0_spiel_core *spc, struct m0_fs_stats *stats) |
int | m0_spiel_confstr (struct m0_spiel *spl, char **out) |
int | m0_spiel_conf_pver_status (struct m0_spiel *spl, struct m0_fid *fid, struct m0_conf_pver_info *out_info) |
enum m0_repreb_type |
M0_INTERNAL int m0_spiel__fs_stats_fetch | ( | struct m0_spiel_core * | spc, |
struct m0_fs_stats * | stats | ||
) |
A less demanding version of m0_spiel_filesystem_stats_fetch() requiring a properly initialised m0_spiel_core as a "lightweight spiel" instance.
Definition at line 2315 of file cmd.c.
int m0_spiel_cmd_profile_set | ( | struct m0_spiel * | spiel, |
const char * | profile_str | ||
) |
int m0_spiel_conf_pver_status | ( | struct m0_spiel * | spl, |
struct m0_fid * | fid, | ||
struct m0_conf_pver_info * | out_info | ||
) |
Returns the status of the pool version according to number of failed srecd objects in the pool version.
This is a wrapper over conf/pvers.h m0_conf_pver_status().
spl | spiel instance, must have confc cache initialized and populated. |
fid | fid of the pool version whose status is queried. |
out_info | out parameter which will contain status along with some pdclust attributes of pool version. |
Definition at line 2397 of file cmd.c.
int m0_spiel_confstr | ( | struct m0_spiel * | spl, |
char ** | out | ||
) |
Dumps configuration cache to a string in XC format.
Configuration cache is expected to be fully loaded at this point. (Call m0_spiel_confstr() after m0_spiel_rconfc_start(), and you will be fine.)
Definition at line 2380 of file cmd.c.
int m0_spiel_controller_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent | ||
) |
Adds controller to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the controller |
parent | fid of the parent enclosure |
Definition at line 1518 of file conf_mgmt.c.
int m0_spiel_controller_v_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | real | ||
) |
Adds controller "v-object"
tx | spiel transaction |
fid | fid of controller-v |
parent | fid of the parent enclosure-v |
real | fid of the enclosure this object points to |
Definition at line 1864 of file conf_mgmt.c.
int m0_spiel_device_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | drive, | ||
uint32_t | dev_idx, | ||
enum m0_cfg_storage_device_interface_type | iface, | ||
enum m0_cfg_storage_device_media_type | media, | ||
uint32_t | bsize, | ||
uint64_t | size, | ||
uint64_t | last_state, | ||
uint64_t | flags, | ||
const char * | filename | ||
) |
Adds service to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the device |
parent | fid of the parent service |
drive | fid of the corresponding drive |
iface | device interface type |
media | device media type |
bsize | block size in bytes |
size | size in bytes |
last_state | last known state (bitmask of m0_cfg_state_bit) |
flags | different flags (bitmask of m0_cfg_flag_bit) |
filename | device filename. |
Definition at line 1156 of file conf_mgmt.c.
int m0_spiel_dix_rebalance_status | ( | struct m0_spiel * | spl, |
const struct m0_fid * | pool_fid, | ||
struct m0_spiel_repreb_status ** | statuses | ||
) |
int m0_spiel_dix_repair_status | ( | struct m0_spiel * | spl, |
const struct m0_fid * | pool_fid, | ||
struct m0_spiel_repreb_status ** | statuses | ||
) |
int m0_spiel_drive_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent | ||
) |
Adds drive to the configuration tree of the transcation
tx | spiel transaction |
fid | fid of the drive |
parent | fid of the parent controller |
Definition at line 1562 of file conf_mgmt.c.
int m0_spiel_drive_v_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | real | ||
) |
Adds drive "v-object"
tx | spiel transaction |
fid | fid of drive-v |
parent | fid of the parent controller-v |
real | fid of the drive this object points to |
Definition at line 1912 of file conf_mgmt.c.
int m0_spiel_element_del | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid | ||
) |
Deletes element that was previously added to transaction configuration tree.
tx | spiel transaction |
fid | fid of the object to be deleted |
Definition at line 2124 of file conf_mgmt.c.
int m0_spiel_enclosure_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | node | ||
) |
Adds enclosure to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the enclosure |
parent | fid of the parent rack |
node | the node this enclosure is associated with |
Definition at line 1470 of file conf_mgmt.c.
int m0_spiel_enclosure_v_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | real | ||
) |
Adds enclosure "v-object"
tx | spiel transaction |
fid | fid of enclosure-v |
parent | fid of the parent rack-v |
real | fid of the enclosure this object points to |
Definition at line 1816 of file conf_mgmt.c.
int m0_spiel_filesystem_stats_fetch | ( | struct m0_spiel * | spl, |
struct m0_fs_stats * | stats | ||
) |
Fetches stats for filesystem pools within the profile. Spiel API internally polls all process instances registered in configuration database under the profile.
[in] | spl | spiel instance, must have profile fid set up to the moment of the call |
[out] | stats | instance of m0_fs_stats to be filled with resultant values. The instance counter values are written only in case of success, and must be ignored otherwise. |
Definition at line 2374 of file cmd.c.
void m0_spiel_fini | ( | struct m0_spiel * | spiel | ) |
Initialises spiel instance. Should be invoked before using other spiel functions. If initialisation fails, then spiel instance must not be used.
spiel | spiel instance |
reqh | request handler |
Definition at line 44 of file spiel.c.
int m0_spiel_node_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
uint32_t | memsize, | ||
uint32_t | nr_cpu, | ||
uint64_t | last_state, | ||
uint64_t | flags | ||
) |
Adds node to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the node |
memsize | amount of available memory on the node |
nr_cpu | number of CPUs on the node |
last_state | last known state (bitmask of m0_cfg_state_bit) |
flags | different flags (bitmask of m0_cfg_flag_bit) |
Definition at line 974 of file conf_mgmt.c.
int m0_spiel_pool_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
uint32_t | pver_policy | ||
) |
Adds pool to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the pool |
pver_policy | pool version policy |
Definition at line 1339 of file conf_mgmt.c.
int m0_spiel_pool_rebalance_status | ( | struct m0_spiel * | spl, |
const struct m0_fid * | pool_fid, | ||
struct m0_spiel_sns_status ** | statuses | ||
) |
int m0_spiel_pool_repair_status | ( | struct m0_spiel * | spl, |
const struct m0_fid * | pool_fid, | ||
struct m0_spiel_sns_status ** | statuses | ||
) |
int m0_spiel_pool_version_done | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid | ||
) |
Signals that constructing pool version tree is finished
tx | spiel transaction |
fid | fid of the pool version |
Definition at line 2075 of file conf_mgmt.c.
int m0_spiel_proc_counters_fetch | ( | struct m0_spiel * | spl, |
struct m0_fid * | proc_fid, | ||
struct m0_proc_counter * | count_stats | ||
) |
Fetches byte counts and object counts per pool version written by all end users from a target ioservice. All entries in the byte count btree present in the ioservice is fetched by a call of this API.
[in] | spl | spiel instance used for executing spiel command. |
[in] | proc_fid | fid of the target ioservice. |
[out] | count_stats | instance of m0_proc_counter to be filled with resultant values. Check m0_proc_counter::pc_rc for successful execution, ignore rest of the values otherwise. |
Definition at line 2211 of file cmd.c.
int m0_spiel_process_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
struct m0_bitmap * | cores, | ||
uint64_t | memlimit_as, | ||
uint64_t | memlimit_rss, | ||
uint64_t | memlimit_stack, | ||
uint64_t | memlimit_memlock, | ||
const char * | endpoint | ||
) |
Adds process to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the process |
parent | fid of the parent node |
cores | limit on the number of used cores |
memlimit_* | memory limit for the process |
endpoint | process endpoint |
Definition at line 1033 of file conf_mgmt.c.
int m0_spiel_process_lib_load | ( | struct m0_spiel * | spl, |
const struct m0_fid * | proc_fid, | ||
const char * | libname | ||
) |
Loads a library in the process address space.
Library loading is supported only in user space at the moment. The library must be loadable by dlopen(3).
When the library is loaded, motr_lib_init() function in it (if present) is invoked without parameters. This funciton is called in a fom tick context, so it shouldn't block.
spl | spiel instance |
proc_fid | process fid from configuration DB |
libname | full path to the library in the server file system. |
Definition at line 892 of file cmd.c.
int m0_spiel_process_list_services | ( | struct m0_spiel * | spl, |
const struct m0_fid * | proc_fid, | ||
struct m0_spiel_running_svc ** | services | ||
) |
Lists currently running services inside the motr process. Can be used to monitor services and detect service failures.
spl | spiel instance |
proc_fid | process fid from configuration DB |
services | array to store running services fid and name, see m0_spiel_running_svc |
Definition at line 858 of file cmd.c.
int m0_spiel_profile_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid | ||
) |
Adds profile to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the profile |
Definition at line 1236 of file conf_mgmt.c.
int m0_spiel_profile_pool_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | profile, | ||
const struct m0_fid * | pool | ||
) |
Adds pool into the profile
To add several pools into the profile - call this routine several times with a new argument each time.
Definition at line 1304 of file conf_mgmt.c.
int m0_spiel_pver_actual_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_pdclust_attr * | attrs, | ||
uint32_t * | tolerance, | ||
uint32_t | tolerance_len | ||
) |
Adds an actual pool version.
Pool version is represented as a tree of "v-objects". "V-objects" can be added to the pool version using calls like m0_spiel_site_v_add(), m0_spiel_rack_v_add(), etc. After all "V-objects" are added, function m0_spiel_pool_version_done() should be called.
Parameter tolerance is number of allowed HW failures in each failure domain. Currently there are 5 failure domains: sites, racks, enclosures, controllers, and drives.
tx | spiel transaction |
fid | fid of the pool version |
parent | fid of the parent pool |
attrs | attributes specific to layout type |
tolerance | allowed failures for each failure domain |
tolerance_len | number of elements in tolerance array |
Definition at line 1601 of file conf_mgmt.c.
int m0_spiel_pver_formulaic_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
uint32_t | index, | ||
const struct m0_fid * | base_pver, | ||
uint32_t * | allowance, | ||
uint32_t | allowance_len | ||
) |
Adds a formulaic pool version.
tx | Spiel transaction. |
fid | Pool version fid. |
parent | Parent pool fid. |
index | Cluster-unique identifier of this formulaic pver. |
base_pver | Actual pver, the subtree of which is used as a base for virtual pver creation/restoration. |
allowance | Number of allowed failures for each level of pver subtree. |
allowance_len | Number of elements in the ‘allowance’ array. |
Definition at line 1659 of file conf_mgmt.c.
int m0_spiel_rack_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent | ||
) |
Adds rack to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the rack |
parent | fid of the parent site |
Definition at line 1426 of file conf_mgmt.c.
int m0_spiel_rack_v_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | real | ||
) |
Adds rack "v-object"
tx | spiel transaction |
fid | fid of rack-v |
parent | fid of the parent site-v |
real | fid of the rack this object points to |
Definition at line 1768 of file conf_mgmt.c.
int m0_spiel_rconfc_start | ( | struct m0_spiel * | spiel, |
m0_rconfc_cb_t | expired_cb | ||
) |
Starts spiel instance.
Schematic code to start spiel using standard motr setup procedure:
spiel | spiel instance |
m0_rconfc_cb_t | rconfc expiration callback |
Definition at line 66 of file spiel.c.
void m0_spiel_rconfc_stop | ( | struct m0_spiel * | spiel | ) |
int m0_spiel_root_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | rootfid, | ||
const struct m0_fid * | mdpool, | ||
const struct m0_fid * | imeta_pver, | ||
uint32_t | mdredundancy, | ||
const char ** | params | ||
) |
Adds the configuration tree of the transaction
tx | spiel transaction |
rootfid | Any fid. Reserved for future use. |
mdpool | meta-data pool |
imeta_pver | Distributed index meta-data pool version. It contains storage devices controlled by CAS services — no IOS storage devices are allowed. If there are no CAS services in configuration then the value should be M0_FID0. Index meta-data is created (analogue of m0mkfs for distributed indices) during cluster provisioning via m0_dix_meta_create() or via special utility like m0dixinit. m0_dix_meta_create() will refuse to create meta-data if it already exists. In this case user may destroy meta-data via m0_dix_meta_destroy() or just zero corresponding devices. For more detailed information see dix/client.h, "Index meta-data" section. |
mdredundancy | meta-data redundancy |
params | NULL-terminated array of extra parameters. Parameters are copied, so caller can safely free them. |
Definition at line 902 of file conf_mgmt.c.
int m0_spiel_service_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_spiel_service_info * | service_info | ||
) |
Adds service to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the service |
parent | fid of the parent process |
service_info | service info |
Definition at line 1101 of file conf_mgmt.c.
Checks health status of the motr service
spl | spiel instance |
svc_fid | service fid from configuration DB |
Definition at line 537 of file cmd.c.
Returns status of the motr service
spl | spiel instance |
svc_fid | service fid from configuration DB |
Definition at line 556 of file cmd.c.
Stops motr service. Stopping of Top Level RM is disallowed, the function returns -EPERM result code in this case.
spl | spiel instance |
svc_fid | service fid from configuration DB |
Definition at line 525 of file cmd.c.
int m0_spiel_site_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid | ||
) |
Adds site to the configuration tree of the transaction
tx | spiel transaction |
fid | fid of the site |
Definition at line 1382 of file conf_mgmt.c.
int m0_spiel_site_v_add | ( | struct m0_spiel_tx * | tx, |
const struct m0_fid * | fid, | ||
const struct m0_fid * | parent, | ||
const struct m0_fid * | real | ||
) |
Adds site "v-object"
tx | spiel transaction |
fid | fid of site-v |
parent | fid of the parent pool version |
real | fid of the site this object points to |
Definition at line 1716 of file conf_mgmt.c.
Aborts pool SNS or DIX rebalance operation.
Aborts ongoing pool SNS or DIX rebalance operation. Waits until all the sns services notify completion.
spl | spiel instance |
pool_fid | pool identifier |
Definition at line 1631 of file cmd.c.
Continues pool rebalance.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and resumes rebalance which was paused. 0 is returned if each service replies with success result code. Spiel client is able to check status of the current rebalance process by calling of m0_spiel_sns_rebalance_status() or m0_spiel_dix_rebalance_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1531 of file cmd.c.
Quiesces pool rebalance.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and pauses rebalance. 0 is returned if each service replies with success result code (rebalance process is in PAUSED state). Spiel client is able to check status of the current rebalance process by calling of m0_spiel_sns_rebalance_status() or m0_spiel_dix_rebalance_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1566 of file cmd.c.
Starts pool rebalance.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and starts rebalance. 0 is returned if each service replies with success result code. Spiel client is able to check status of the current rebalance process by calling of m0_spiel_sns_rebalance_status() or m0_spiel_dix_rebalance_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1504 of file cmd.c.
int m0_spiel_sns_rebalance_status | ( | struct m0_spiel * | spl, |
const struct m0_fid * | pool_fid, | ||
struct m0_spiel_repreb_status ** | statuses | ||
) |
Gets status of pool rebalance.
The command is synchronous. It waits replies from all SNS or DIX services.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
statuses | pointer where statuses of services will be stored |
Definition at line 1593 of file cmd.c.
Aborts pool repair.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and aborts repair. 0 is returned if each service replies with success result code (repair process is successfully aborted). Spiel client is able to check status of the current repair process by calling of m0_spiel_sns_repair_status() or m0_spiel_dix_repair_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1438 of file cmd.c.
Continues pool repair.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and resumes repair which was paused by m0_spiel_sns_repair_quiesce() or m0_spiel_dix_repair_quiesce(). 0 is returned if each service replies with success result code. Spiel client is able to check status of the current repair process by calling of m0_spiel_sns_repair_status() or m0_spiel_dix_repair_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1384 of file cmd.c.
Quiesces pool repair.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and pauses repair. 0 is returned if each service replies with success result code (repair process is in PAUSED state). Spiel client is able to check status of the current repair process by calling of m0_spiel_sns_repair_status() or m0_spiel_dix_repair_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1411 of file cmd.c.
Starts pool repair.
The command is synchronous. It waits replies from all SNS or DIX services that each one receives fop and starts repair. 0 is returned if each service replies with success result code. Spiel client is able to check status of the current repair process by calling of m0_spiel_sns_repair_status() or m0_spiel_dix_repair_status() command.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
Definition at line 1357 of file cmd.c.
int m0_spiel_sns_repair_status | ( | struct m0_spiel * | spl, |
const struct m0_fid * | pool_fid, | ||
struct m0_spiel_repreb_status ** | statuses | ||
) |
Gets status of pool repair.
The command is synchronous. It waits replies from all SNS or DIX services.
spl | spiel instance |
pool_fid | pool fid from configuration DB |
statuses | pointer where statuses of services will be stored |
Definition at line 1465 of file cmd.c.
void m0_spiel_tx_close | ( | struct m0_spiel_tx * | tx | ) |
Closes spiel transaction.
Once function is called spiel transaction can't be used anymore.
tx | spiel transaction |
Frees Spiel context without completing the transaction.
Definition at line 171 of file conf_mgmt.c.
int m0_spiel_tx_commit | ( | struct m0_spiel_tx * | tx | ) |
Commits filled-in spiel transaction. The call performs normal committing when reaching quorum is mandatory for uploading new configuration to confd servers and putting it in effect. Endpoints of confd and rm services will be resolved internally by rconfc which gets them from HA service.
Once function succeeded, the spiel transaction must not be committed anymore. When failed, forced committing with m0_spiel_tx_commit_forced() still remains as an option.
tx | spiel transaction |
Definition at line 723 of file conf_mgmt.c.
int m0_spiel_tx_commit_forced | ( | struct m0_spiel_tx * | tx, |
bool | forced, | ||
uint64_t | ver_forced, | ||
uint32_t * | rquorum | ||
) |
Commits filled-in spiel transaction forcing as many loads and flips as possible, no matter if quorum reached or not. The call allows version number be overridden compared to the version number obtained at m0_spiel_start(). In this case ver_forced must be of the value other than M0_CONF_VER_UNKNOWN, otherwise the version number value remains what it initially was.
The spiel transaction may be forcibly committed as many times as required completing previously failed uploads to confd servers.
tx | spiel transaction |
forced | committing with forcing any possible LOAD/FLIP enabled |
ver_forced | version number the initial value to be overridden with |
rquorum | resultant quorum value reached, NULL value allowed |
Definition at line 591 of file conf_mgmt.c.
int m0_spiel_tx_dump | ( | struct m0_spiel_tx * | tx, |
uint64_t | ver_forced, | ||
const char * | filename | ||
) |
Saves spiel transaction dump to file.
Definition at line 2205 of file conf_mgmt.c.
int m0_spiel_tx_dump_debug | ( | struct m0_spiel_tx * | tx, |
uint64_t | ver_forced, | ||
const char * | filename | ||
) |
Saves spiel transaction dump to file with error and stub object too.
Definition at line 2212 of file conf_mgmt.c.
void m0_spiel_tx_open | ( | struct m0_spiel * | spiel, |
struct m0_spiel_tx * | tx | ||
) |
Initialises and opens spiel transaction.
In case transaction is created for the sole purpose of dumping conf data, to string or file, ‘spiel’ parameter may be NULL:
In case (spiel == NULL), the transaction must not be m0_spiel_tx_commit()ted.
Definition at line 105 of file conf_mgmt.c.
void m0_spiel_tx_str_free | ( | char * | str | ) |
Definition at line 2182 of file conf_mgmt.c.
int m0_spiel_tx_to_str | ( | struct m0_spiel_tx * | tx, |
uint64_t | ver_forced, | ||
char ** | str | ||
) |
Saves spiel transaction dump to string. Caller is responsible for freeing the string with m0_spiel_tx_str_free().
Definition at line 2174 of file conf_mgmt.c.
int m0_spiel_tx_validate | ( | struct m0_spiel_tx * | tx | ) |
Checks configuration tree contained in transaction. It is valid if each configuration object has state M0_CS_READY and has real parent (if any is required). Valid transaction is ready for dump or commit.
tx | spiel transaction |
Check cache for completeness: each element has state M0_CS_READY and has real parent (if last need by obj type)
Definition at line 136 of file conf_mgmt.c.