23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SPIEL 36 #include "conf/onwire_xc.h" 75 #define SPIEL_CONF_CHECK(cache, ...) \ 76 spiel_conf_parameter_check(cache, (struct spiel_conf_param []) { \ 78 { NULL, NULL, NULL }, }); 156 &
obj->co_parent->co_id);
157 if (obj_parent ==
NULL ||
158 obj_parent !=
obj->co_parent)
281 for (
i = 0;
i < segs_nr; ++
i) {
321 if (load_rep !=
NULL) {
599 const char **confd_eps =
NULL;
649 if (spiel_cmd ==
NULL) {
658 confd_eps[idx],
NULL,
670 if (!forced && quorum < tx->spt_spiel->spl_rconfc.rc_quorum) {
698 if (spiel_cmd !=
NULL) {
747 &
r->rt_fdmi_flt_grps));
754 &M0_CONF_NODE_PROCESSES_FID,
756 &
node->cn_processes));
763 &M0_CONF_PROCESS_SERVICES_FID,
772 &M0_CONF_SERVICE_SDEVS_FID,
781 &M0_CONF_POOL_PVERS_FID,
792 &M0_CONF_SITE_RACKS_FID,
803 &M0_CONF_RACK_ENCLS_FID,
812 &M0_CONF_ENCLOSURE_CTRLS_FID,
821 &M0_CONF_CONTROLLER_DRIVES_FID,
830 &M0_CONF_PVER_SITEVS_FID,
832 &
pver->pv_u.subtree.pvs_sitevs));
841 &M0_CONF_SITEV_RACKVS_FID,
852 &M0_CONF_RACKV_ENCLVS_FID,
861 &M0_CONF_ENCLV_CTRLVS_FID,
870 &M0_CONF_CTRLV_DRIVEVS_FID,
903 const struct m0_fid *rootfid,
904 const struct m0_fid *mdpool,
905 const struct m0_fid *imeta_pver,
906 uint32_t mdredundancy,
916 if (M0_IN(
NULL, (rootfid, mdpool, imeta_pver,
params)))
926 {mdpool, &M0_CONF_POOL_TYPE, &pool},
927 {&M0_CONF_ROOT_FID, &M0_CONF_ROOT_TYPE, &root_obj});
930 {imeta_pver, &M0_CONF_PVER_TYPE, &pver});
991 {fid, &M0_CONF_NODE_TYPE, &obj },
992 {&M0_CONF_ROOT_FID, &M0_CONF_ROOT_TYPE,
998 node->cn_memsize = memsize;
999 node->cn_nr_cpu = nr_cpu;
1000 node->cn_last_state = last_state;
1035 const struct m0_fid *parent,
1037 uint64_t memlimit_as,
1038 uint64_t memlimit_rss,
1039 uint64_t memlimit_stack,
1040 uint64_t memlimit_memlock,
1041 const char *endpoint)
1055 {fid, &M0_CONF_PROCESS_TYPE, &obj },
1056 {parent, &M0_CONF_NODE_TYPE, &obj_parent});
1103 const struct m0_fid *parent,
1113 if (service_info ==
NULL ||
1119 {fid, &M0_CONF_SERVICE_TYPE, &obj },
1120 {parent, &M0_CONF_PROCESS_TYPE, &obj_parent});
1158 const struct m0_fid *parent,
1159 const struct m0_fid *drive,
1165 uint64_t last_state,
1187 {fid, &M0_CONF_SDEV_TYPE, &obj },
1188 {parent, &M0_CONF_SERVICE_TYPE, &svc_obj},
1189 {drive, &M0_CONF_DRIVE_TYPE, &drv_obj});
1248 {fid, &M0_CONF_PROFILE_TYPE, &obj},
1249 {&M0_CONF_ROOT_FID, &M0_CONF_ROOT_TYPE,
1292 memcpy(tmp,
fids->af_elems,
fids->af_count *
sizeof(
fids->af_elems[0]));
1298 fids->af_elems = tmp;
1322 " m0_spiel_profile_add() missing?");
1341 uint32_t pver_policy)
1353 {fid, &M0_CONF_POOL_TYPE, &obj },
1354 {&M0_CONF_ROOT_FID, &M0_CONF_ROOT_TYPE, &parent});
1359 pool->pl_pver_policy = pver_policy;
1395 {fid, &M0_CONF_SITE_TYPE, &obj },
1396 {&M0_CONF_ROOT_FID, &M0_CONF_ROOT_TYPE,
1428 const struct m0_fid *parent)
1440 {fid, &M0_CONF_RACK_TYPE, &obj },
1441 {parent, &M0_CONF_SITE_TYPE, &obj_parent});
1472 const struct m0_fid *parent,
1486 {fid, &M0_CONF_ENCLOSURE_TYPE, &obj },
1487 {parent, &M0_CONF_RACK_TYPE, &obj_parent},
1488 {node, &M0_CONF_NODE_TYPE, &node_obj});
1520 const struct m0_fid *parent)
1532 {fid, &M0_CONF_CONTROLLER_TYPE, &obj },
1533 {parent, &M0_CONF_ENCLOSURE_TYPE, &obj_parent});
1564 const struct m0_fid *parent)
1575 {fid, &M0_CONF_DRIVE_TYPE, &obj },
1576 {parent, &M0_CONF_CONTROLLER_TYPE, &obj_parent});
1603 const struct m0_fid *parent,
1605 uint32_t *tolerance,
1606 uint32_t tolerance_len)
1624 {fid, &M0_CONF_PVER_TYPE, &obj},
1625 {parent, &M0_CONF_POOL_TYPE, &obj_parent});
1631 memcpy(
pver->pv_u.subtree.pvs_tolerance, tolerance,
1633 pver->pv_u.subtree.pvs_attr = *attrs;
1661 const struct m0_fid *parent,
1663 const struct m0_fid *base_pver,
1664 uint32_t *allowance,
1665 uint32_t allowance_len)
1681 {fid, &M0_CONF_PVER_TYPE, &obj},
1682 {base_pver, &M0_CONF_PVER_TYPE, &base_obj},
1683 {parent, &M0_CONF_POOL_TYPE, &obj_parent});
1689 memcpy(
pver->pv_u.formulaic.pvf_allowance, allowance,
1692 pver->pv_u.formulaic.pvf_base = *base_pver;
1718 const struct m0_fid *parent,
1719 const struct m0_fid *real)
1731 if (real_obj ==
NULL)
1736 {fid, &M0_CONF_OBJV_TYPE, &obj },
1737 {parent, &M0_CONF_PVER_TYPE, &obj_parent},
1738 {real, &M0_CONF_SITE_TYPE, &real_obj});
1748 if (
pver->pv_u.subtree.pvs_sitevs ==
NULL) {
1770 const struct m0_fid *parent,
1771 const struct m0_fid *real)
1784 {fid, &M0_CONF_OBJV_TYPE, &obj },
1785 {parent, &M0_CONF_OBJV_TYPE, &obj_parent},
1786 {real, &M0_CONF_RACK_TYPE, &real_obj});
1818 const struct m0_fid *parent,
1819 const struct m0_fid *real)
1832 {fid, &M0_CONF_OBJV_TYPE, &obj },
1833 {parent, &M0_CONF_OBJV_TYPE, &obj_parent},
1834 {real, &M0_CONF_ENCLOSURE_TYPE, &real_obj});
1866 const struct m0_fid *parent,
1867 const struct m0_fid *real)
1880 {fid, &M0_CONF_OBJV_TYPE, &obj },
1881 {parent, &M0_CONF_OBJV_TYPE, &obj_parent},
1882 {real, &M0_CONF_CONTROLLER_TYPE, &real_obj});
1914 const struct m0_fid *parent,
1915 const struct m0_fid *real)
1928 {fid, &M0_CONF_OBJV_TYPE, &obj },
1929 {parent, &M0_CONF_OBJV_TYPE, &obj_parent},
1930 {real, &M0_CONF_DRIVE_TYPE, &real_obj});
1978 for (nr_pvers = 0; pvers !=
NULL && pvers[nr_pvers] !=
NULL; ++nr_pvers)
1985 memcpy(pvers_new, pvers, nr_pvers *
sizeof(*pvers));
1986 pvers_new[nr_pvers] =
pver;
2024 for (
i = 0; pvers[
i] !=
NULL; ++
i) {
2025 if (pvers[
i] ==
pver)
2028 pvers[
i] = pvers[
i + 1];
2041 m0_conf_dir_tlist_del(*
obj);
2057 for (entry =
NULL; (
rc =
dir->co_ops->coo_readdir(
dir, &entry)) > 0; ) {
2097 &
pver->pv_u.subtree.pvs_sitevs->cd_obj);
2137 m0_conf_dir_tlist_del(
obj);
2156 rc = fwrite(str, strlen(str), 1,
file) == 1 ? 0 : -EINVAL;
2163 uint64_t ver_forced,
2175 uint64_t ver_forced,
2189 uint64_t ver_forced,
2220 #undef M0_TRACE_SUBSYSTEM static int spiel_rack_dirs_create(struct m0_conf_rack *rack)
static m0_bcount_t seg_size
const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
static int spiel_process_dirs_create(struct m0_conf_process *process)
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)
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_segment_size(struct m0_net_domain *dom)
static void wlock_ctx_creditor_setup(struct m0_spiel_wlock_ctx *wlx)
static struct m0_mutex lock
static bool spiel_cores_is_valid(const struct m0_bitmap *cores)
static int spiel_site_dirs_create(struct m0_conf_site *site)
#define M0_ALLOC_ARR(arr, nr)
static int spiel_load_fop_send(struct m0_spiel_tx *tx, struct m0_spiel_load_command *spiel_cmd)
const struct m0_conf_obj_type M0_CONF_OBJV_TYPE
M0_INTERNAL const char ** m0_strings_dup(const char **src)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
M0_INTERNAL struct m0_fop_conf_load * m0_conf_fop_to_load_fop(const struct m0_fop *fop)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static void wlock_ctx_semaphore_down(struct m0_spiel_wlock_ctx *wlx)
int m0_spiel_tx_dump_debug(struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename)
struct m0_conf_obj ce_obj
int const char const void size_t int flags
int m0_spiel_tx_commit(struct m0_spiel_tx *tx)
struct m0_rw_lockable wlc_rwlock
struct m0_rpc_session slc_session
const struct m0_conf_obj_type M0_CONF_PROFILE_TYPE
static void _spiel_tx_write_lock_get(struct m0_spiel_wlock_ctx *wlx)
static struct m0_rm_remote creditor
M0_INTERNAL int m0_rpc_bulk_store(struct m0_rpc_bulk *rbulk, const struct m0_rpc_conn *conn, struct m0_net_buf_desc_data *to_desc, const struct m0_net_buffer_callbacks *bulk_cb)
int m0_spiel_tx_validate(struct m0_spiel_tx *tx)
struct m0_rm_remote * ro_creditor
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)
static int spiel_str_to_file(char *str, const char *filename)
int m0_spiel_profile_add(struct m0_spiel_tx *tx, const struct m0_fid *fid)
int m0_spiel_pool_add(struct m0_spiel_tx *tx, const struct m0_fid *fid, uint32_t pver_policy)
static void spiel_tx_write_lock_complete(struct m0_rm_incoming *in, int32_t rc)
struct m0_conf_obj cd_obj
const struct m0_conf_obj_type M0_CONF_SITE_TYPE
void(* rio_complete)(struct m0_rm_incoming *in, int32_t rc)
const m0_time_t M0_TIME_NEVER
static struct io_request req
struct m0_fop slc_flip_fop
uint64_t pc_memlimit_memlock
#define m0_count(var, nr,...)
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_lookup(const struct m0_conf_cache *cache, const struct m0_fid *id)
#define M0_CFG_SDEV_INTERFACE_TYPE_IS_VALID(dtype)
M0_INTERNAL void m0_conf_dir_add(struct m0_conf_dir *dir, struct m0_conf_obj *obj)
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
M0_INTERNAL int m0_rpc_bulk_buf_databuf_add(struct m0_rpc_bulk_buf *rbuf, void *buf, m0_bcount_t count, m0_bindex_t index, struct m0_net_domain *netdom)
#define M0_LOG(level,...)
const struct m0_conf_obj_type * m0_conf_fid_type(const struct m0_fid *fid)
const struct m0_conf_obj_type M0_CONF_PVER_TYPE
const struct m0_conf_obj_type M0_CONF_SERVICE_TYPE
M0_INTERNAL void m0_confx_string_free(char *str)
static struct net_test_cmd_node * node
void m0_spiel_tx_str_free(char *str)
M0_INTERNAL void m0_rm_rwlock_req_init(struct m0_rm_incoming *req, struct m0_rm_owner *owner, const struct m0_rm_incoming_ops *ops, enum m0_rm_incoming_flags flags, enum m0_rm_rwlock_req_type type)
static int spiel_pool_dirs_create(struct m0_conf_pool *pool)
static uint64_t spiel_root_conf_version(struct m0_spiel_tx *tx)
static void _spiel_tx_write_lock_put(struct m0_spiel_wlock_ctx *wlx)
M0_INTERNAL void m0_rpc_bulk_fini(struct m0_rpc_bulk *rbulk)
static int spiel_node_dirs_create(struct m0_conf_node *node)
int m0_rpc_session_destroy(struct m0_rpc_session *session, m0_time_t abs_timeout)
int m0_spiel_pool_version_done(struct m0_spiel_tx *tx, const struct m0_fid *fid)
const struct m0_conf_obj_type M0_CONF_SDEV_TYPE
M0_INTERNAL void m0_conf_obj_put(struct m0_conf_obj *obj)
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)
struct m0_net_domain * ntm_dom
static int spiel_pver_iterator(struct m0_conf_obj *dir, struct m0_conf_pver *pver, int(*action)(struct m0_conf_obj **, struct m0_conf_pver *))
static void wlock_ctx_creditor_unset(struct m0_spiel_wlock_ctx *wlx)
const struct m0_conf_obj_type M0_CONF_ROOT_TYPE
const char ** svi_endpoints
const struct m0_conf_obj_type M0_CONF_POOL_TYPE
static int spiel_service_dirs_create(struct m0_conf_service *service)
#define m0_exists(var, nr,...)
M0_INTERNAL void m0_rm_remote_init(struct m0_rm_remote *rem, struct m0_rm_resource *res)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_rpc_session * rem_session
M0_INTERNAL struct m0_conf_pver ** m0_conf_pvers(const struct m0_conf_obj *obj)
M0_INTERNAL bool m0_fid_is_set(const struct m0_fid *fid)
struct m0_fop_getxattr_rep * rep
static int struct dentry int struct nameidata * nd
M0_INTERNAL void m0_rw_lockable_fini(struct m0_rw_lockable *lockable)
static void spiel_tx_write_lock_put(struct m0_spiel_tx *tx)
M0_INTERNAL int m0_rm_owner_timedwait(struct m0_rm_owner *owner, uint64_t state, const m0_time_t abs_timeout)
const struct m0_conf_obj_type M0_CONF_CONTROLLER_TYPE
int m0_spiel_tx_commit_forced(struct m0_spiel_tx *tx, bool forced, uint64_t ver_forced, uint32_t *rquorum)
M0_INTERNAL void m0_rpc_bulk_buflist_empty(struct m0_rpc_bulk *rbulk)
static void spiel_load_fop_fini(struct m0_spiel_load_command *spiel_cmd)
struct m0_fop slc_load_fop
void m0_spiel_tx_close(struct m0_spiel_tx *tx)
static int spiel_root_ver_update(struct m0_spiel_tx *tx, uint64_t verno)
struct m0_fop_type m0_fop_conf_load_fopt
struct m0_rpc_machine * wlc_rmach
int m0_spiel_site_add(struct m0_spiel_tx *tx, const struct m0_fid *fid)
M0_INTERNAL int m0_rconfc_rm_endpoint(struct m0_rconfc *rconfc, char **ep)
static int spiel_enclosure_dirs_create(struct m0_conf_enclosure *enclosure)
M0_TL_DESCR_DECLARE(rpcbulk, M0_EXTERN)
struct m0_conf_dir * ce_ctrls
struct m0_rpc_bulk slc_rbulk
M0_INTERNAL void m0_rm_rwlock_owner_init(struct m0_rm_owner *owner, struct m0_fid *fid, struct m0_rw_lockable *lockable, struct m0_rm_remote *creditor)
static int spiel_objv_remove(struct m0_conf_obj **obj, struct m0_conf_pver *pver)
M0_INTERNAL int m0_conf_dir_new(struct m0_conf_obj *parent, const struct m0_fid *relfid, const struct m0_conf_obj_type *children_type, const struct m0_fid_arr *children_ids, struct m0_conf_dir **out)
M0_INTERNAL void m0_conf_obj_get(struct m0_conf_obj *obj)
struct m0_fop_type * f_type
static void spiel_flip_fop_release(struct m0_ref *ref)
uint64_t pc_memlimit_stack
static bool spiel_load_cmd_invariant(struct m0_spiel_load_command *cmd)
#define M0_ERR_INFO(rc, fmt,...)
static void spiel_load_fop_release(struct m0_ref *ref)
static int spiel_load_fop_create(struct m0_spiel_tx *tx, struct m0_spiel_load_command *spiel_cmd)
struct m0_conf_root * root
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL int m0_rpc_client_connect(struct m0_rpc_conn *conn, struct m0_rpc_session *session, struct m0_rpc_machine *rpc_mach, const char *remote_addr, struct m0_fid *svc_fid, uint64_t max_rpcs_in_flight, m0_time_t abs_timeout)
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)
static void wlock_ctx_owner_windup(struct m0_spiel_wlock_ctx *wlx)
static bool m0_conf_service_type_is_valid(enum m0_conf_service_type t)
M0_INTERNAL void m0_rm_rwlock_owner_fini(struct m0_rm_owner *owner)
#define M0_AMB(obj, ptr, field)
const struct m0_conf_obj_type M0_CONF_ENCLOSURE_TYPE
static int spiel_pver_add(struct m0_conf_obj **obj_v, struct m0_conf_pver *pver)
static void wlock_ctx_semaphore_up(struct m0_spiel_wlock_ctx *wlx)
struct m0_fid rt_imeta_pver
enum m0_net_queue_type nb_qtype
int m0_spiel_drive_add(struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent)
int m0_spiel_tx_dump(struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename)
struct m0_conf_dir * cc_drives
struct m0_net_buffer * bb_nbuf
struct m0_net_transfer_mc rm_tm
struct m0_semaphore wlc_sem
M0_INTERNAL int m0_conf_cache_to_string(struct m0_conf_cache *cache, char **str, bool debug)
struct m0_conf_dir * rt_nodes
int m0_spiel_profile_pool_add(struct m0_spiel_tx *tx, const struct m0_fid *profile, const struct m0_fid *pool)
M0_INTERNAL void m0_fid_tgenerate(struct m0_fid *fid, const uint8_t tid)
M0_INTERNAL void m0_rpc_bulk_init(struct m0_rpc_bulk *rbulk)
static void wlock_ctx_destroy(struct m0_spiel_wlock_ctx *wlx)
M0_INTERNAL void m0_rw_lockable_init(struct m0_rw_lockable *lockable, const struct m0_fid *fid, struct m0_rm_domain *dom)
static void rconfc_fail(struct m0_rconfc *rconfc, int rc)
struct m0_net_buf_desc_data clf_desc
#define SPIEL_CONF_CHECK(cache,...)
M0_INTERNAL void m0_conf_cache_init(struct m0_conf_cache *cache, struct m0_mutex *lock)
int m0_spiel_element_del(struct m0_spiel_tx *tx, const struct m0_fid *fid)
struct m0_conf_obj cv_obj
int m0_rpc_conn_destroy(struct m0_rpc_conn *conn, m0_time_t abs_timeout)
int m0_spiel_rack_add(struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent)
static int spiel_pver_dirs_create(struct m0_conf_pver *pver)
struct m0_rpc_item * ri_reply
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static int spiel_flip_fop_send(struct m0_spiel_tx *tx, struct m0_spiel_load_command *spiel_cmd)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
struct m0_conf_dir * rt_sites
int m0_rpc_post_sync(struct m0_fop *fop, struct m0_rpc_session *session, const struct m0_rpc_item_ops *ri_ops, m0_time_t deadline)
const struct m0_conf_obj_type M0_CONF_DRIVE_TYPE
const struct m0_fid M0_RWLOCK_FID
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)
struct m0_bitmap pc_cores
static struct m0_rpc_machine * spiel_rmachine(struct m0_spiel *spl)
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)
struct m0_rm_incoming wlc_req
struct m0_rm_owner wlc_owner
M0_INTERNAL int m0_conf_obj_find(struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out)
static int spiel_tx_write_lock_get(struct m0_spiel_tx *tx)
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
static const struct m0_fid fids[]
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
struct m0_rm_incoming wlc_req
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)
#define M0_CONF_CAST(ptr, type)
struct m0_conf_sdev * ck_sdev
M0_INTERNAL int m0_rwlockable_domain_type_init(struct m0_rm_domain *rwl_dom, struct m0_rm_resource_type *rwl_rt)
int m0_spiel_controller_add(struct m0_spiel_tx *tx, const struct m0_fid *fid, const struct m0_fid *parent)
struct m0_conf_dir * rt_profiles
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)
struct m0_conf_dir * rt_pools
struct m0_conf_obj ** scp_obj
uint32_t cff_prev_version
static int spiel_enclosurev_dirs_create(struct m0_conf_objv *objv)
static int spiel_controller_dirs_create(struct m0_conf_controller *controller)
struct m0_fid wlc_owner_fid
m0_cfg_storage_device_media_type
struct m0_conf_obj cc_obj
static int spiel_root_dirs_create(struct m0_conf_root *r)
static int spiel_conf_parameter_check(struct m0_conf_cache *cache, struct spiel_conf_param *parameters)
static struct m0_pool pool
M0_INTERNAL void m0_bitmap_copy(struct m0_bitmap *dst, const struct m0_bitmap *src)
const struct m0_conf_obj_type * scp_type
struct m0_conf_node * ce_node
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
void m0_spiel_tx_open(struct m0_spiel *spiel, struct m0_spiel_tx *tx)
M0_INTERNAL int m0_rconfc_confd_endpoints(struct m0_rconfc *rconfc, const char ***eps)
uint32_t cff_next_version
static void wlock_ctx_disconnect(struct m0_spiel_wlock_ctx *wlx)
struct m0_conf_obj pc_obj
M0_INTERNAL void m0_rm_credit_put(struct m0_rm_incoming *in)
struct m0_conf_dir * pc_services
struct m0_rpc_session wlc_sess
static uint8_t fail[DATA_UNIT_COUNT_MAX+PARITY_UNIT_COUNT_MAX]
m0_cfg_storage_device_interface_type
struct m0_rpc_conn slc_connect
static struct m0_fid profile
static int wlock_ctx_semaphore_init(struct m0_spiel_wlock_ctx *wlx)
struct m0_conf_obj ct_obj
static void spiel_tx_write_lock_conflict(struct m0_rm_incoming *in)
int m0_spiel_tx_to_str(struct m0_spiel_tx *tx, uint64_t ver_forced, char **str)
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_rconfc_start(struct m0_spiel *spiel, m0_rconfc_cb_t expired_cb)
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_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)
M0_INTERNAL void m0_strings_free(const char **arr)
struct m0_conf_cache spt_cache
static void spiel_rwlockable_write_domain_fini(struct m0_spiel_wlock_ctx *wlx)
#define M0_CFG_SDEV_MEDIA_TYPE_IS_VALID(dtype)
static int spiel_sitev_dirs_create(struct m0_conf_objv *objv)
#define M0_FI_ENABLED(tag)
const struct m0_conf_obj_type M0_CONF_NODE_TYPE
static int confd_count(const struct m0_conf_service *service, struct m0_ha_entrypoint_rep *rep, uint32_t index)
M0_INTERNAL void m0_rm_remote_fini(struct m0_rm_remote *rem)
struct m0_spiel * spt_spiel
M0_INTERNAL void m0_conf_cache_del(const struct m0_conf_cache *cache, struct m0_conf_obj *obj)
static void spiel_pver_remove(struct m0_conf_cache *cache, struct m0_conf_pver *pver)
#define M0_ALLOC_PTR(ptr)
static int spiel_load_fop_init(struct m0_spiel_load_command *spiel_cmd, struct m0_spiel_tx *tx)
const struct m0_fid M0_CONF_ROOT_FID
static int spiel_tx_dump(struct m0_spiel_tx *tx, uint64_t ver_forced, const char *filename, bool debug)
M0_INTERNAL void m0_rm_owner_windup(struct m0_rm_owner *owner)
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)
static int spiel_rwlockable_write_domain_init(struct m0_spiel_wlock_ctx *wlx)
struct m0_rm_resource_type wlc_rt
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL uint64_t m0_rconfc_ver_max_read(struct m0_rconfc *rconfc)
void m0_fop_put_lock(struct m0_fop *fop)
struct m0_fop_type m0_fop_conf_flip_fopt
static struct m0_fop * fop
enum m0_conf_status co_status
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
M0_INTERNAL void m0_rm_incoming_fini(struct m0_rm_incoming *in)
struct m0_conf_dir * cv_children
struct m0_conf_dir * cr_encls
M0_INTERNAL void m0_rm_owner_creditor_reset(struct m0_rm_owner *owner, struct m0_rm_remote *creditor)
static int spiel_profile_pool_add(struct m0_conf_profile *prof, const struct m0_fid *pool)
struct m0_rconfc spl_rconfc
static int spiel_rackv_dirs_create(struct m0_conf_objv *objv)
struct m0_rm_domain wlc_dom
const struct m0_conf_obj_type M0_CONF_FDMI_FLT_GRP_TYPE
struct m0_conf_dir * ct_racks
enum m0_conf_service_type svi_type
struct m0_rm_remote wlc_creditor
M0_INTERNAL void m0_conf_dir_del(struct m0_conf_dir *dir, struct m0_conf_obj *obj)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
const struct m0_conf_obj_type M0_CONF_PROCESS_TYPE
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)
M0_INTERNAL struct m0_fop_conf_flip * m0_conf_fop_to_flip_fop(const struct m0_fop *fop)
const struct m0_net_buffer_callbacks m0_rpc__buf_bulk_cb
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static int wlock_ctx_create(struct m0_spiel *spl)
struct m0_spiel_wlock_ctx * spl_wlock_ctx
M0_INTERNAL void m0_conf_cache_fini(struct m0_conf_cache *cache)
static int spiel_pver_delete(struct m0_conf_obj *obj, const struct m0_conf_pver *pver)
M0_INTERNAL int m0_rpc_bulk_buf_add(struct m0_rpc_bulk *rbulk, uint32_t segs_nr, m0_bcount_t length, struct m0_net_domain *netdom, struct m0_net_buffer *nb, struct m0_rpc_bulk_buf **out)
const struct m0_conf_obj_type M0_CONF_DIR_TYPE
#define m0_tl_for(name, head, obj)
M0_INTERNAL void m0_rwlockable_domain_type_fini(struct m0_rm_domain *rwl_dom, struct m0_rm_resource_type *rwl_rt)
const struct m0_fid * scp_fid
struct m0_rpc_item f_item
static int wlock_ctx_connect(struct m0_spiel_wlock_ctx *wlx)
struct m0_rpc_conn wlc_conn
struct m0_conf_obj cr_obj
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
static struct m0_rm_incoming_ops spiel_tx_ri_ops
M0_INTERNAL bool m0_conf_obj_invariant(const struct m0_conf_obj *obj)
static int spiel_controllerv_dirs_create(struct m0_conf_objv *objv)
M0_INTERNAL struct m0_fop_conf_flip_rep * m0_conf_fop_to_flip_fop_rep(const struct m0_fop *fop)
M0_INTERNAL struct m0_fop_conf_load_rep * m0_conf_fop_to_load_fop_rep(const struct m0_fop *fop)
const struct m0_conf_obj_type M0_CONF_RACK_TYPE
static int spiel_tx_to_str(struct m0_spiel_tx *tx, uint64_t ver_forced, char **str, bool debug)
M0_INTERNAL void m0_rm_credit_get(struct m0_rm_incoming *in)
struct m0_conf_obj * cv_real
struct m0_rm_resource * ro_resource
int const char void * buffer
#define M0_IMPOSSIBLE(fmt,...)
M0_INTERNAL bool m0_pdclust_attr_check(const struct m0_pdclust_attr *attr)