23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SPIEL 99 M0_CONF_NODE_PROCESSES_FID,
100 M0_CONF_PROCESS_SERVICES_FID);
107 if (
svc->cs_type == M0_CST_IOS) {
116 spiel_string_tlink_init_at(entry,
list);
130 const struct m0_fid *drive,
155 M0_CONF_ROOT_SITES_FID,
156 M0_CONF_SITE_RACKS_FID,
157 M0_CONF_RACK_ENCLS_FID,
158 M0_CONF_ENCLOSURE_CTRLS_FID);
168 M0_CONF_CONTROLLER_DRIVES_FID, *drive);
192 const char *remote_ep,
209 if (rpc_link ==
NULL)
259 const struct m0_fid *obj_fid,
262 const struct m0_fid *path,
277 m0_fid_eq(&path[0], &M0_CONF_ROOT_POOLS_FID));
308 if (*conf_obj ==
NULL &&
rc == 0)
325 const struct m0_fid *path)
391 return M0_RC(*ss_ep ==
NULL ? -ENOENT : 0);
402 M0_CONF_ROOT_NODES_FID,
403 M0_CONF_NODE_PROCESSES_FID,
404 M0_CONF_PROCESS_SERVICES_FID);
433 const struct m0_fid *svc_fid,
477 const struct m0_fid *svc_fid,
498 if (
rc == 0 && status !=
NULL)
547 const struct m0_fid *svc_fid)
572 const char *endpoint,
573 const struct m0_fid *dev_fid,
594 if (ha_state !=
NULL)
595 *ha_state =
rep->ssdp_ha_state;
607 const struct m0_fid *drive,
611 struct m0_tl endpoints;
620 spiel_string_tlist_init(&endpoints);
623 if (
rc == 0 && spiel_string_tlist_is_empty(&endpoints))
624 rc =
M0_ERR_INFO(-ENOENT,
"No IOS endpoints found for drive " 631 drive, cmd, ha_state);
636 spiel_string_tlist_fini(&endpoints);
648 const struct m0_fid *dev_fid,
685 const struct m0_fid *proc,
692 M0_CONF_ROOT_NODES_FID,
693 M0_CONF_NODE_PROCESSES_FID);
839 if (services ==
NULL)
845 if (services[
i].spls_name ==
NULL)
917 m0_fids_tlink_init_at(
si, tl);
940 const char *remote_ep,
1049 M0_CONF_SERVICE_SDEVS_FID);
1066 struct m0_spiel_core *spc,
1072 m0_fids_tlist_init(&
ctx->pl_sdevs_fid);
1073 m0_fids_tlist_init(&
ctx->pl_services_fid);
1074 M0_POST(m0_fids_tlist_invariant(&
ctx->pl_sdevs_fid));
1075 M0_POST(m0_fids_tlist_invariant(&
ctx->pl_services_fid));
1082 if (!m0_fids_tlist_is_empty(&
ctx->pl_sdevs_fid))
1086 m0_fids_tlist_fini(&
ctx->pl_sdevs_fid);
1088 if (!m0_fids_tlist_is_empty(&
ctx->pl_services_fid))
1092 m0_fids_tlist_fini(&
ctx->pl_services_fid);
1113 if (pool_ctx->
pl_rc != 0)
1195 const struct m0_fid *pool_fid)
1206 M0_CONF_ROOT_POOLS_FID) ?:
1208 M0_CONF_POOL_PVERS_FID,
1209 M0_CONF_PVER_SITEVS_FID,
1210 M0_CONF_SITEV_RACKVS_FID,
1211 M0_CONF_RACKV_ENCLVS_FID,
1212 M0_CONF_ENCLV_CTRLVS_FID,
1213 M0_CONF_CTRLV_DRIVEVS_FID);
1235 const struct m0_fid *pool_fid,
1263 M0_CONF_ROOT_NODES_FID,
1264 M0_CONF_NODE_PROCESSES_FID,
1265 M0_CONF_PROCESS_SERVICES_FID) ?:
1271 service_count = m0_fids_tlist_length(&
ctx.pl_services_fid);
1274 if (repreb ==
NULL) {
1280 if (repreb_statuses ==
NULL) {
1303 " ha_state=%d",
FID_P(&
si->i_fid),
i,
1318 " rc=%d service="FID_F" i=%d",
rc,
1344 if (
rc == 0 && cmd_status) {
1346 *statuses = repreb_statuses;
1358 const struct m0_fid *pool_fid)
1368 const struct m0_fid *pool_fid)
1379 const struct m0_fid *pool_fid)
1385 const struct m0_fid *pool_fid)
1395 const struct m0_fid *pool_fid)
1406 const struct m0_fid *pool_fid)
1412 const struct m0_fid *pool_fid)
1422 const struct m0_fid *pool_fid)
1433 const struct m0_fid *pool_fid)
1439 const struct m0_fid *pool_fid)
1449 const struct m0_fid *pool_fid)
1460 const struct m0_fid *pool_fid)
1466 const struct m0_fid *pool_fid,
1481 const struct m0_fid *pool_fid,
1497 const struct m0_fid *pool_fid,
1505 const struct m0_fid *pool_fid)
1515 const struct m0_fid *pool_fid)
1526 const struct m0_fid *pool_fid)
1532 const struct m0_fid *pool_fid)
1542 const struct m0_fid *node_fid)
1545 " operation not implemented",
FID_P(node_fid));
1550 const struct m0_fid *pool_fid)
1561 const struct m0_fid *pool_fid)
1567 const struct m0_fid *pool_fid)
1577 const struct m0_fid *pool_fid)
1588 const struct m0_fid *pool_fid)
1594 const struct m0_fid *pool_fid,
1609 const struct m0_fid *pool_fid,
1624 const struct m0_fid *pool_fid,
1632 const struct m0_fid *pool_fid)
1642 const struct m0_fid *pool_fid)
1653 const struct m0_fid *pool_fid)
1805 ctx->fx_free_seg) ||
1807 ctx->fx_total_seg) ||
1809 ctx->fx_free_disk) ||
1811 ctx->fx_total_disk)) {
1814 ctx->fx_free_seg +=
rep->sspr_free_seg;
1815 ctx->fx_total_seg +=
rep->sspr_total_seg;
1816 ctx->fx_free_disk +=
rep->sspr_free_disk;
1817 ctx->fx_avail_disk +=
rep->sspr_avail_disk;
1818 ctx->fx_total_disk +=
rep->sspr_total_disk;
1841 return p->spi_ctx->fx_spc->spc_confc->cc_group;
1941 struct m0_spiel_core *spc,
1949 spiel_proc_items_tlist_init(&fsx->
fx_items);
1962 spiel_proc_items_tlist_fini(&fsx->
fx_items);
1989 si->spi_fid =
item->co_id;
1991 spiel_proc_items_tlink_init_at(
si, &fsx->
fx_items);
2025 M0_CONF_PROCESS_SERVICES_FID);
2030 if (M0_IN(
svc->cs_type, (M0_CST_IOS, M0_CST_MDS, M0_CST_CAS)))
2075 rep->sspr_bckey.b_nob);
2077 rep->sspr_bcrec.b_nob);
2096 return i->sci_spc->spc_confc->cc_group;
2176 struct m0_spiel_core *spc = proc->
sci_spc;
2203 for (
i = 0;
i <= failed_index;
i++) {
2216 struct m0_spiel_core *spc = &spl->
spl_core;
2229 return M0_ERR_INFO(-EAGAIN,
"confc is finalised");
2295 memcpy(count_stats->
pc_bckey[
i], key_cur,
2297 memcpy(count_stats->
pc_bcrec[
i], rec_cur,
2328 return M0_ERR_INFO(-EAGAIN,
"confc is finalised");
2334 M0_CONF_ROOT_NODES_FID,
2335 M0_CONF_NODE_PROCESSES_FID) ?:
2344 spiel_proc_items_tlist_del(proc);
2408 return M0_ERR_INFO(-EAGAIN,
"confc is finalised");
2414 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
int m0_spiel_pool_rebalance_start(struct m0_spiel *spl, const struct m0_fid *pool_fid)
M0_INTERNAL int m0_spiel__fs_stats_fetch(struct m0_spiel_core *spc, struct m0_fs_stats *stats)
static int spiel_process_command_execute(struct m0_spiel_core *spc, const struct m0_fid *proc_fid, int cmd, const struct m0_buf *param, struct m0_ss_process_rep *ssp_rep)
M0_INTERNAL int m0_rpc_post(struct m0_rpc_item *item)
struct m0_fid hae_active_rm_fid
static void spiel_fop_destroy(struct m0_fop *fop)
static int spiel_pool_generic_handler(struct m0_spiel_core *spc, const struct m0_fid *pool_fid, const enum m0_cm_op cmd, struct m0_spiel_repreb_status **statuses, enum m0_repreb_type type)
int m0_spiel_sns_rebalance_quiesce(struct m0_spiel *spl, const struct m0_fid *pool_fid)
static struct m0_addb2_philter p
struct m0_conf_obj * cc_root
#define M0_ALLOC_ARR(arr, nr)
const struct m0_conf_obj_type M0_CONF_OBJV_TYPE
M0_INTERNAL struct m0_fop * m0_sss_device_fop_create(struct m0_rpc_machine *mach, uint32_t cmd, const struct m0_fid *fid)
int m0_spiel_sns_rebalance_continue(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)
struct m0_spiel_bckey ** pc_bckey
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static void _fs_stats_ctx_unlock(struct _fs_stats_ctx *fsx)
static struct m0_list list
m0_bcount_t fx_total_disk
static void spiel_proc_item_postprocess(struct spiel_proc_item *proc)
enum m0_rpc_item_priority ri_prio
int m0_spiel_sns_rebalance_status(struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses)
struct _fs_stats_ctx * spi_ctx
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
struct m0_ha_entrypoint_rep rc_ha_entrypoint_rep
static int spiel_pool_device_collect(struct _pool_cmd_ctx *ctx, struct m0_conf_obj *obj_diskv)
int m0_rpc_post_with_timeout_sync(struct m0_fop *fop, struct m0_rpc_session *session, const struct m0_rpc_item_ops *ri_ops, m0_time_t deadline, m0_time_t timeout)
struct m0_spiel_core * sci_spc
void(* sa_cb)(struct m0_sm_group *grp, struct m0_sm_ast *)
M0_INTERNAL int m0_sns_cm_trigger_fop_alloc(struct m0_rpc_machine *mach, uint32_t op, struct m0_fop **fop)
const m0_time_t M0_TIME_NEVER
static struct io_request req
M0_INTERNAL int m0_rpc_link_init(struct m0_rpc_link *rlink, struct m0_rpc_machine *mach, struct m0_fid *svc_fid, const char *ep, uint64_t max_rpcs_in_flight)
static struct m0_sm_group * grp
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
static bool _filter_pool(const struct m0_conf_obj *obj)
#define M0_LOG(level,...)
int m0_spiel_dix_repair_abort(struct m0_spiel *spl, const struct m0_fid *pool_fid)
const struct m0_conf_obj_type * m0_conf_fid_type(const struct m0_fid *fid)
const struct m0_conf_obj_type M0_CONF_SERVICE_TYPE
M0_INTERNAL void m0_sm_ast_post(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL void m0_confx_string_free(char *str)
int m0_spiel_dix_rebalance_abort(struct m0_spiel *spl, const struct m0_fid *pool_fid)
struct m0_semaphore sci_barrier
static struct net_test_cmd_node * node
unsigned int srs_progress
int m0_spiel_sns_repair_status(struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses)
static bool spiel_proc_item_rlink_cb(struct m0_clink *clink)
static int spiel__pool_cmd_status_get(struct _pool_cmd_ctx *ctx, const enum m0_cm_op cmd, struct spiel_repreb *repreb)
static void leave(struct m0_locality_chore *chore, struct m0_locality *loc, void *place)
int m0_spiel_service_start(struct m0_spiel *spl, const struct m0_fid *svc_fid)
static struct m0_sm_group * spiel_counter_sm_group(struct spiel_proc_counter_item *i)
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
const struct m0_conf_obj_type M0_CONF_SDEV_TYPE
int m0_spiel_dix_repair_quiesce(struct m0_spiel *spl, const struct m0_fid *pool_fid)
M0_INTERNAL int m0_conf_diter_next_sync(struct m0_conf_diter *it, bool(*filter)(const struct m0_conf_obj *obj))
M0_INTERNAL void m0_conf_obj_put(struct m0_conf_obj *obj)
static void spiel__add_item(struct _pool_cmd_ctx *pool_ctx, const struct m0_conf_obj *item, struct m0_conf_service *service, enum m0_conf_service_type type)
int m0_spiel_sns_repair_abort(struct m0_spiel *spl, const struct m0_fid *pool_fid)
void * m0_fop_data(const struct m0_fop *fop)
static struct m0_be_emap_cursor it
uint32_t fx_svc_processed
static bool m0_addu64_will_overflow(uint64_t a, uint64_t b)
const struct m0_conf_obj_type M0_CONF_POOL_TYPE
static struct m0_addb2_mach * mach
M0_INTERNAL void m0_rpc_link_fini(struct m0_rpc_link *rlink)
int m0_spiel_device_attach_state(struct m0_spiel *spl, const struct m0_fid *dev_fid, uint32_t *ha_state)
int m0_spiel_dix_rebalance_continue(struct m0_spiel *spl, const struct m0_fid *pool_fid)
M0_TL_DEFINE(spiel_string, static, struct spiel_string_entry)
struct m0_fop_type m0_fop_ss_fopt
static bool _filter_controller(const struct m0_conf_obj *obj)
M0_INTERNAL struct m0_ss_process_rep * m0_ss_fop_process_rep(struct m0_fop *fop)
static bool spiel_proc_counter_item_rlink_cb(struct m0_clink *clink)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_spiel_bcrec ** pc_bcrec
#define SPIEL_CONF_OBJ_FIND(confc, fid, conf_obj, filter,...)
M0_INTERNAL const char * m0_rpc_machine_ep(const struct m0_rpc_machine *rmach)
int m0_spiel_dix_repair_start(struct m0_spiel *spl, const struct m0_fid *pool_fid)
static void spiel__fs_stats_ctx_init(struct _fs_stats_ctx *fsx, struct m0_spiel_core *spc, const struct m0_conf_obj_type *item_type)
int m0_spiel_pool_repair_status(struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_sns_status **statuses)
M0_INTERNAL struct m0_fop * m0_ss_process_fop_create(struct m0_rpc_machine *mach, uint32_t cmd, const struct m0_fid *fid)
static struct m0_rpc_item * item
M0_INTERNAL bool m0_conf_obj_is_stub(const struct m0_conf_obj *obj)
struct m0_fop_getxattr_rep * rep
int m0_rpc_item_wait_for_reply(struct m0_rpc_item *item, m0_time_t timeout)
static bool _filter_objv(const struct m0_conf_obj *obj)
int m0_spiel_pool_rebalance_continue(struct m0_spiel *spl, const struct m0_fid *pool_fid)
static void spiel_process_health_replied_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
const struct m0_conf_obj_type M0_CONF_CONTROLLER_TYPE
struct m0_clink sci_rlink_wait
struct m0_fop_type m0_fop_process_fopt
static int spiel_process__counters_async(struct spiel_proc_counter_item *proc)
int m0_spiel_sns_rebalance_start(struct m0_spiel *spl, const struct m0_fid *pool_fid)
static int spiel_running_svcs_list_fill(struct m0_bufs *bufs, struct m0_spiel_running_svc **svcs)
struct m0_clink spi_rlink_wait
int m0_spiel_sns_repair_start(struct m0_spiel *spl, const struct m0_fid *pool_fid)
int m0_spiel_device_format(struct m0_spiel *spl, const struct m0_fid *dev_fid)
int m0_spiel_conf_pver_status(struct m0_spiel *spl, struct m0_fid *fid, struct m0_conf_pver_info *out_info)
static int spiel_ss_ep_for_svc(const struct m0_conf_service *s, char **ss_ep)
int m0_spiel_device_detach(struct m0_spiel *spl, const struct m0_fid *dev_fid)
static struct m0_sm_ast ast[NR]
M0_TL_DESCR_DEFINE(spiel_string, "list of endpoints", static, struct spiel_string_entry, sse_link, sse_magic, M0_STATS_MAGIC, M0_STATS_HEAD_MAGIC)
int m0_spiel_sns_repair_continue(struct m0_spiel *spl, const struct m0_fid *pool_fid)
void m0_fop_put0_lock(struct m0_fop *fop)
int m0_spiel_process_reconfig(struct m0_spiel *spl, const struct m0_fid *proc_fid)
int m0_spiel_service_status(struct m0_spiel *spl, const struct m0_fid *svc_fid, int *status)
struct m0_spiel_core * pl_spc
struct m0_spiel::m0_spiel_core spl_core
struct m0_rpc_machine * m0_fop_rpc_machine(const struct m0_fop *fop)
#define M0_ERR_INFO(rc, fmt,...)
struct m0_conf_root * root
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_rpc_machine_unlock(struct m0_rpc_machine *machine)
int m0_spiel_pool_rebalance_status(struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_sns_status **statuses)
static void spiel_process__health_async(struct _fs_stats_ctx *fsx, struct spiel_proc_item *proc)
#define M0_AMB(obj, ptr, field)
struct m0_rpc_link spi_rlink
#define m0_tl_teardown(name, head, obj)
static int spiel_process_command_send(struct m0_spiel_core *spc, const struct m0_fid *proc_fid, struct m0_fop *fop, struct m0_rpc_link **rlink)
static struct m0_confc * spiel_confc(struct m0_spiel *spl)
int m0_spiel_process_stop(struct m0_spiel *spl, const struct m0_fid *proc_fid)
struct m0_rpc_link sr_rlink
static bool spiel__item_enlist(const struct m0_conf_obj *item, void *ctx)
M0_INTERNAL int m0_conf_cache_to_string(struct m0_conf_cache *cache, char **str, bool debug)
M0_INTERNAL const char * m0_conf_service_type2str(enum m0_conf_service_type type)
static struct m0_confc * confc
static int spiel_repreb_fop_fill_and_send(struct m0_spiel_core *spc, struct m0_fop *fop, enum m0_cm_op op, struct spiel_repreb *repreb)
static bool spiel_proc_item_disconnect_cb(struct m0_clink *clink)
static int spiel_svc_conf_obj_find(struct m0_spiel_core *spc, const struct m0_fid *svc, struct m0_conf_service **out)
m0_bcount_t fx_avail_disk
static int _spiel_conf_dir_iterate(struct m0_confc *confc, void *ctx, bool(*iter_cb)(const struct m0_conf_obj *item, void *ctx), uint32_t nr_lvls, const struct m0_fid *path)
static struct m0_ss_process_rep * spiel_process_reply_data(struct m0_fop *fop)
static int spiel_node_process_endpoint_add(struct m0_spiel_core *spc, struct m0_conf_obj *node, struct m0_tl *list)
struct m0_conf_obj * m0_conf_obj_grandparent(const struct m0_conf_obj *obj)
enum m0_ha_obj_state co_ha_state
int m0_spiel_process_quiesce(struct m0_spiel *spl, const struct m0_fid *proc_fid)
int m0_spiel_dix_rebalance_status(struct m0_spiel *spl, const struct m0_fid *pool_fid, struct m0_spiel_repreb_status **statuses)
M0_INTERNAL int m0_conf_obj_ha_update(const struct m0_fid *obj_fid)
static bool spiel__pool_service_select(const struct m0_conf_obj *item, void *ctx)
static bool spiel__pool_service_has_sdev(struct _pool_cmd_ctx *ctx, const struct m0_conf_obj *service)
int m0_spiel_service_quiesce(struct m0_spiel *spl, const struct m0_fid *svc_fid)
int m0_spiel_service_init(struct m0_spiel *spl, const struct m0_fid *svc_fid)
static void spiel__pool_ctx_init(struct _pool_cmd_ctx *ctx, struct m0_spiel_core *spc, enum m0_repreb_type type)
M0_INTERNAL struct m0_ss_process_req * m0_ss_fop_process_req(struct m0_fop *fop)
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_abort(struct m0_spiel *spl, const struct m0_fid *pool_fid)
static int spiel_svc_generic_handler(struct m0_spiel_core *spc, const struct m0_fid *svc_fid, enum m0_sss_req_cmd cmd, int *status)
struct m0_confc * spc_confc
int m0_spiel_dix_rebalance_quiesce(struct m0_spiel *spl, const struct m0_fid *pool_fid)
struct m0_semaphore fx_barrier
int m0_spiel_confstr(struct m0_spiel *spl, char **out)
struct m0_fop * m0_fop_get(struct m0_fop *fop)
static void spiel_proc_item_disconnect_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
struct m0_rpc_item * ri_reply
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
M0_INTERNAL const struct m0_fid_type * m0_fid_type_getfid(const struct m0_fid *fid)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
static void fop_fini(void)
const struct m0_conf_obj_type M0_CONF_DRIVE_TYPE
struct m0_rpc_item_ops spiel_process_counter_ops
static struct m0_sss_rep * spiel_sss_reply_data(struct m0_fop *fop)
static struct m0_rpc_machine * spiel_rmachine(struct m0_spiel *spl)
enum m0_cm_status srs_state
static int spiel_svc_fop_fill_and_send(struct m0_spiel_core *spc, struct m0_fop *fop, const struct m0_fid *svc_fid, uint32_t cmd, struct m0_rpc_link **rlink)
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
M0_INTERNAL void m0_buf_free(struct m0_buf *buf)
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
#define M0_CONF_CAST(ptr, type)
struct m0_conf_sdev * ck_sdev
M0_INTERNAL bool m0_confc_is_inited(const struct m0_confc *confc)
static struct m0_clink clink[RDWR_REQUEST_MAX]
struct m0_conf_service * sr_service
struct m0_tl pl_sdevs_fid
M0_INTERNAL int m0_rpc_link_disconnect_sync(struct m0_rpc_link *rlink, m0_time_t abs_timeout)
int m0_spiel_pool_repair_start(struct m0_spiel *spl, const struct m0_fid *pool_fid)
#define m0_confc_open_sync(result, origin,...)
int m0_spiel_device_attach(struct m0_spiel *spl, const struct m0_fid *dev_fid)
static struct fdmi_ctx ctx
int m0_spiel_dix_repair_continue(struct m0_spiel *spl, const struct m0_fid *pool_fid)
static struct m0_sm_group * spiel_proc_sm_group(const struct spiel_proc_item *p)
M0_INTERNAL void m0_conf_obj_get_lock(struct m0_conf_obj *obj)
int m0_conf_pver_status(struct m0_fid *fid, struct m0_confc *confc, struct m0_conf_pver_info *out_info)
M0_INTERNAL int m0_rpc_link_connect_sync(struct m0_rpc_link *rlink, m0_time_t abs_timeout)
struct m0_spiel_core * fx_spc
int m0_spiel_service_stop(struct m0_spiel *spl, const struct m0_fid *svc_fid)
struct m0_conf_node * ce_node
int m0_spiel_service_health(struct m0_spiel *spl, const struct m0_fid *svc_fid)
static void spiel_process_disconnect_async(struct spiel_proc_item *proc)
void(* rio_replied)(struct m0_rpc_item *item)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL struct m0_conf_obj * m0_conf_diter_result(const struct m0_conf_diter *it)
static void _fs_stats_ctx_lock(struct _fs_stats_ctx *fsx)
static int spiel_endpoints_for_device_generic(struct m0_spiel_core *spc, const struct m0_fid *drive, struct m0_tl *out)
struct m0_conf_obj pc_obj
#define m0_conf_diter_init(iter, confc, origin,...)
int32_t m0_rpc_item_error(const struct m0_rpc_item *item)
static int spiel_repreb_cmd_send(struct m0_rpc_machine *rmachine, const char *remote_ep, struct spiel_repreb *repreb)
static int spiel_pool__device_collection_fill(struct _pool_cmd_ctx *ctx, const struct m0_fid *pool_fid)
static void spiel_process_counter_replied(struct m0_rpc_item *item)
M0_INTERNAL void m0_rpc_link_connect_async(struct m0_rpc_link *rlink, m0_time_t abs_timeout, struct m0_clink *wait_clink)
static int spiel__proc_is_to_update_stats(struct spiel_proc_item *proc, struct m0_confc *confc)
static int spiel_device_command_fop_send(struct m0_spiel_core *spc, const char *endpoint, const struct m0_fid *dev_fid, int cmd, uint32_t *ha_state)
#define SPIEL_CONF_DIR_ITERATE(confc, ctx, iter_cb,...)
M0_INTERNAL struct m0_sss_device_fop_rep * m0_sss_fop_to_dev_rep(struct m0_fop *fop)
struct m0_tl pl_services_fid
static bool _filter_proc(const struct m0_conf_obj *obj)
int m0_spiel_dix_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_fid)
#define M0_FI_ENABLED(tag)
const struct m0_conf_obj_type M0_CONF_NODE_TYPE
M0_INTERNAL void m0_rpc_machine_lock(struct m0_rpc_machine *machine)
int m0_spiel_pool_rebalance_abort(struct m0_spiel *spl, const struct m0_fid *pool_fid)
int m0_spiel_process_list_services(struct m0_spiel *spl, const struct m0_fid *proc_fid, struct m0_spiel_running_svc **services)
static void spiel_process_counter_replied_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static int spiel_cmd_send(struct m0_rpc_machine *rmachine, const char *remote_ep, struct m0_fop *cmd_fop, m0_time_t timeout, struct m0_rpc_link **rlink)
static bool _filter_sdev(const struct m0_conf_obj *obj)
static void spiel__pool_ctx_fini(struct _pool_cmd_ctx *ctx)
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
int m0_spiel_sns_repair_quiesce(struct m0_spiel *spl, const struct m0_fid *pool_fid)
struct m0_tl * sci_counters
#define M0_ALLOC_PTR(ptr)
int m0_spiel_filesystem_stats_fetch(struct m0_spiel *spl, struct m0_fs_stats *stats)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
struct m0_conf_obj cn_obj
const struct m0_rpc_item_ops * ri_ops
struct m0_conf_obj cs_obj
m0_time_t m0_time_from_now(uint64_t secs, long ns)
M0_INTERNAL void m0_conf_diter_fini(struct m0_conf_diter *it)
int m0_spiel_process_health(struct m0_spiel *spl, const struct m0_fid *proc_fid)
struct m0_rpc_session * ri_session
static struct m0_net_test_service svc
struct m0_conf_obj sd_obj
int m0_spiel_process_lib_load(struct m0_spiel *spl, const struct m0_fid *proc_fid, const char *libname)
static struct m0_fop * spiel_svc_fop_alloc(struct m0_rpc_machine *mach)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
static int spiel_stats_item_add(struct m0_tl *tl, const struct m0_fid *fid)
int m0_spiel_sns_rebalance_abort(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)
static int _spiel_conf_obj_find(struct m0_confc *confc, const struct m0_fid *obj_fid, bool(*filter)(const struct m0_conf_obj *obj), uint32_t nr_lvls, const struct m0_fid *path, struct m0_conf_obj **conf_obj)
Find object with given obj_fid in provided confc.
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
static int spiel_device_command_send(struct m0_spiel_core *spc, const struct m0_fid *drive, enum m0_sss_device_req_cmd cmd, uint32_t *ha_state)
M0_INTERNAL void m0_confc_close(struct m0_conf_obj *obj)
struct m0_rconfc spl_rconfc
enum m0_repreb_type pl_service_type
struct m0_proc_data sci_data
#define SPIEL_DEVICE_FORMAT_TIMEOUT
struct m0_rpc_session rlk_sess
struct m0_spiel_repreb_status sr_status
static void spiel_rpc_link_destroy(struct m0_rpc_link *rlink)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
static bool _filter_svc(const struct m0_conf_obj *obj)
const struct m0_conf_obj_type * fx_type
const struct m0_conf_obj_type M0_CONF_PROCESS_TYPE
static int spiel_proc_conf_obj_find(struct m0_spiel_core *spc, const struct m0_fid *proc, struct m0_conf_process **out)
struct m0_fid pc_proc_fid
M0_INTERNAL int m0_dix_cm_trigger_fop_alloc(struct m0_rpc_machine *mach, uint32_t op, struct m0_fop **fop)
struct m0_rpc_item_ops spiel_process_health_ops
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
int m0_spiel_proc_counters_fetch(struct m0_spiel *spl, struct m0_fid *proc_fid, struct m0_proc_counter *count_stats)
static int spiel_process_command(struct m0_spiel *spl, const struct m0_fid *proc_fid, int cmd)
static void spiel__fs_stats_ctx_fini(struct _fs_stats_ctx *fsx)
struct m0_rpc_machine * ri_rmachine
static struct m0_dtm_oper_descr reply
struct m0_rpc_link sci_rlink
#define m0_tl_find(name, var, head,...)
M0_INTERNAL void m0_rpc_link_disconnect_async(struct m0_rpc_link *rlink, m0_time_t abs_timeout, struct m0_clink *wait_clink)
#define m0_tl_for(name, head, obj)
static struct m0_addb2_source * s
void m0_fop_put(struct m0_fop *fop)
M0_INTERNAL struct m0_ss_process_svc_list_rep * m0_ss_fop_process_svc_list_rep(struct m0_fop *fop)
struct m0_rpc_item f_item
M0_INTERNAL int m0_conf__diter_init(struct m0_conf_diter *it, struct m0_confc *confc, struct m0_conf_obj *origin, uint32_t nr_lvls, const struct m0_fid *path)
#define M0_BUF_INIT_CONST(size, data)
M0_INTERNAL int m0_confc_open_by_fid_sync(struct m0_confc *confc, const struct m0_fid *fid, struct m0_conf_obj **result)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
struct m0_pdclust_src_addr src
static int spiel_process__health(struct m0_spiel_core *spc, const struct m0_fid *proc_fid)
static void count_stats_failed_free(struct m0_proc_counter *count_stats, int failed_index)
static struct sync_interactions si
int m0_spiel_pool_repair_quiesce(struct m0_spiel *spl, const struct m0_fid *pool_fid)
const m0_time_t M0_TIME_IMMEDIATELY
struct m0_conf_obj * cv_real
static void spiel_process_health_replied(struct m0_rpc_item *item)
static int spiel_svc_fop_fill(struct m0_fop *fop, struct m0_conf_service *svc, uint32_t cmd)
struct m0_fop * m0_fop_alloc(struct m0_fop_type *fopt, void *data, struct m0_rpc_machine *mach)
static int spiel__pool_cmd_send(struct _pool_cmd_ctx *ctx, const enum m0_cm_op cmd, struct spiel_repreb *repreb)