Go to the source code of this file.
|
M0_INTERNAL int | m0_conf_device_cid_to_fid (struct m0_confc *confc, uint64_t cid, struct m0_fid *out) |
|
M0_INTERNAL int | m0_conf_pver_get (struct m0_confc *confc, const struct m0_fid *pool, struct m0_conf_pver **out) |
|
M0_INTERNAL int | m0_conf_full_load (struct m0_conf_root *r) |
|
M0_INTERNAL int | m0_confc_root_open (struct m0_confc *confc, struct m0_conf_root **root) |
|
M0_INTERNAL int | m0_confc_profile_open (struct m0_confc *confc, const struct m0_fid *fid, struct m0_conf_profile **out) |
|
M0_INTERNAL int | m0_confc_service_find (struct m0_confc *confc, enum m0_conf_service_type stype, const char *ep, struct m0_conf_obj **result) |
|
M0_INTERNAL struct m0_reqh * | m0_conf_obj2reqh (const struct m0_conf_obj *obj) |
|
M0_INTERNAL struct m0_reqh * | m0_confc2reqh (const struct m0_confc *confc) |
|
M0_INTERNAL bool | m0_conf_obj_is_pool (const struct m0_conf_obj *obj) |
|
M0_INTERNAL struct m0_conf_pver ** | m0_conf_pvers (const struct m0_conf_obj *obj) |
|
M0_INTERNAL bool | m0_conf_service_is_top_rms (const struct m0_conf_service *svc) |
|
M0_INTERNAL int | m0_conf_devices_count (struct m0_confc *confc, uint64_t svc_types, uint32_t *nr_devices) |
|
M0_INTERNAL void | m0_confc_expired_cb (struct m0_rconfc *rconfc) |
|
M0_INTERNAL void | m0_confc_ready_cb (struct m0_rconfc *rconfc) |
|
M0_INTERNAL bool | m0_conf_service_ep_is_known (const struct m0_conf_obj *svc_obj, const char *ep_addr) |
|
M0_INTERNAL int | m0_conf_process2service_get (struct m0_confc *confc, const struct m0_fid *process_fid, enum m0_conf_service_type stype, struct m0_fid *sfid) |
|
M0_INTERNAL int | m0_conf_objs_ha_update (struct m0_ha_nvec *nvec) |
|
M0_INTERNAL int | m0_conf_obj_ha_update (const struct m0_fid *obj_fid) |
|
M0_INTERNAL int | m0_conf_confc_ha_update (struct m0_confc *confc) |
|
M0_INTERNAL int | m0_conf_confc_ha_update_async (struct m0_confc *confc, struct m0_ha_nvec *nvec, struct m0_chan *chan) |
|
◆ __MOTR_CONF_HELPERS_H__
#define __MOTR_CONF_HELPERS_H__ |
◆ M0_CONF_OBJ_GETTERS
#define M0_CONF_OBJ_GETTERS |
Value:
static struct m0_confc * confc
Definition at line 71 of file helpers.h.
◆ m0_conf_confc_ha_update()
M0_INTERNAL int m0_conf_confc_ha_update |
( |
struct m0_confc * |
confc | ) |
|
- Todo:
- XXX RELOCATEME: This function belongs ha subsystem, not conf.
Update configuration objects ha state from ha service. Fetches HA state of configuration objects from HA service and updates local configuration cache.
Definition at line 658 of file helpers.c.
◆ m0_conf_confc_ha_update_async()
Asynchronous version of m0_conf_confc_ha_update().
- Parameters
-
nvec | should be preserved until the update completion. nvec->nv_note array will be allocated, user is responsible to free it. |
Definition at line 606 of file helpers.c.
◆ m0_conf_device_cid_to_fid()
M0_INTERNAL int m0_conf_device_cid_to_fid |
( |
struct m0_confc * |
confc, |
|
|
uint64_t |
cid, |
|
|
struct m0_fid * |
out |
|
) |
| |
Finds a device object using device index as a key.
Definition at line 100 of file helpers.c.
◆ m0_conf_devices_count()
M0_INTERNAL int m0_conf_devices_count |
( |
struct m0_confc * |
confc, |
|
|
uint64_t |
svc_types, |
|
|
uint32_t * |
nr_devices |
|
) |
| |
Checks that 'obj' is of type M0_CONF_DRIVE_TYPE and this disk is attached to a service of one of types specified in 'svc_types' bitmask.
Example:
m0_is_disk_of_type(conf_obj,
M0_BITS(M0_CST_IOS, M0_CST_CAS));
@encode
/
uint64_t svc_types);
Definition at line 450 of file helpers.c.
◆ m0_conf_full_load()
M0_INTERNAL int m0_conf_full_load |
( |
struct m0_conf_root * |
r | ) |
|
Loads full configuration tree.
Definition at line 165 of file helpers.c.
◆ m0_conf_obj2reqh()
◆ m0_conf_obj_ha_update()
M0_INTERNAL int m0_conf_obj_ha_update |
( |
const struct m0_fid * |
obj_fid | ) |
|
- Todo:
- XXX RELOCATEME: This function belongs ha subsystem, not conf.
Definition at line 587 of file helpers.c.
◆ m0_conf_obj_is_pool()
M0_INTERNAL bool m0_conf_obj_is_pool |
( |
const struct m0_conf_obj * |
obj | ) |
|
◆ m0_conf_objs_ha_update()
M0_INTERNAL int m0_conf_objs_ha_update |
( |
struct m0_ha_nvec * |
nvec | ) |
|
- Todo:
- XXX RELOCATEME: This function belongs ha subsystem, not conf.
Update configuration objects ha state from ha service according to provided HA note vector.
The difference from m0_conf_confc_ha_state_update() is dealing with an arbitrary note vector. Client may fill in the vector following any logic that suits its needs. All the status results which respective conf objects exist in the provided confc instance cache will be applied to all HA clients currently registered with HA global context.
- Precondition
- nvec->nv_nr <= M0_HA_STATE_UPDATE_LIMIT
Definition at line 557 of file helpers.c.
◆ m0_conf_process2service_get()
Gets service fid of type stype from process with process_fid.
Definition at line 518 of file helpers.c.
◆ m0_conf_pver_get()
Obtains a pool version that consists of online elements only.
- Precondition
- m0_conf_fid_type(pool) == &M0_CONF_POOL_TYPE
- Note
- The resulting conf object should be m0_confc_close()d eventually.
- See also
- m0_conf_pver_find()
Definition at line 71 of file helpers.c.
◆ m0_conf_pvers()
◆ m0_conf_service_ep_is_known()
M0_INTERNAL bool m0_conf_service_ep_is_known |
( |
const struct m0_conf_obj * |
svc_obj, |
|
|
const char * |
ep_addr |
|
) |
| |
Finds out if service configuration includes the specified endpoint address, i.e. endpoint is known to service configuration.
Definition at line 197 of file helpers.c.
◆ m0_conf_service_is_top_rms()
M0_INTERNAL bool m0_conf_service_is_top_rms |
( |
const struct m0_conf_service * |
svc | ) |
|
◆ m0_confc2reqh()
◆ m0_confc_expired_cb()
M0_INTERNAL void m0_confc_expired_cb |
( |
struct m0_rconfc * |
rconfc | ) |
|
◆ m0_confc_profile_open()
Opens profile configuration object.
- Parameters
-
confc | Initialised confc instance. |
fid | Fid of the profile to open. |
out | Output parameter. Should be m0_confc_close()d by user. |
Definition at line 234 of file helpers.c.
◆ m0_confc_ready_cb()
M0_INTERNAL void m0_confc_ready_cb |
( |
struct m0_rconfc * |
rconfc | ) |
|
◆ m0_confc_root_open()
Opens root configuration object.
- Parameters
-
confc | Initialised confc instance. |
root | Output parameter. Should be m0_confc_close()d by user. |
Definition at line 219 of file helpers.c.
◆ m0_confc_service_find()
◆ M0_CONF_OBJ_GETTERS