26 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SSS 94 .sd_name =
"SS_FOM_INIT",
105 .sd_name =
"SS_PROCESS_FOM_STOP",
109 .sd_name =
"SS_PROCESS_FOM_RECONFIG_GET_DATA",
114 .sd_name =
"SS_PROCESS_FOM_RECONFIG_DATA_WAIT",
118 .sd_name =
"SS_PROCESS_FOM_RECONFIG",
122 .sd_name =
"SS_PROCESS_FOM_HEALTH",
126 .sd_name =
"SS_PROCESS_FOM_COUNTER",
130 .sd_name =
"SS_PROCESS_FOM_QUIESCE",
134 .sd_name =
"SS_PROCESS_FOM_RUNNING_LIST",
138 .sd_name =
"SS_PROCESS_FOM_LIB_LOAD",
176 if (process_fom ==
NULL || rfop ==
NULL)
301 stats.bas_space_total))
302 return M0_ERR(-EOVERFLOW);
303 rep->sspr_total_seg +=
stats.bas_space_total;
305 stats.bas_space_free))
306 return M0_ERR(-EOVERFLOW);
307 rep->sspr_free_seg +=
stats.bas_space_free;
331 goto consider_DS_in_ut;
340 return M0_ERR(-EOVERFLOW);
356 return M0_ERR(-EOVERFLOW);
359 return M0_ERR(-EOVERFLOW);
360 rep->sspr_free_disk += free_space;
364 return M0_ERR(-EOVERFLOW);
365 rep->sspr_avail_disk += avail_space;
397 key.cbk_user_id = 8881212;
400 rep->sspr_kv_count = 1;
454 svc->rs_type->rst_typecode,
svc->rs_type->rst_level,
455 svc->rs_type->rst_keep_alive ?
"+" :
"-",
456 svc->rs_type->rst_name);
458 if (
svc->rs_type->rst_keep_alive)
473 buf->b_nob =
sizeof(
struct m0_fid) + strlen(
svc->rs_type->rst_name) + 1;
501 fop->sspr_services.ab_count =
i;
503 if (
fop->sspr_services.ab_elems ==
NULL)
504 return M0_RC(-ENOMEM);
511 &
fop->sspr_services.ab_elems[
i]);
593 if (process !=
NULL) {
622 #if !defined(__KERNEL__) 625 char *libname =
req->ssp_param.b_addr;
626 char *
last = &libname[
req->ssp_param.b_nob - 1];
639 handle = dlopen(libname, RTLD_NOW | RTLD_GLOBAL);
640 if (handle !=
NULL) {
641 void (*initcall)(void) = dlsym(handle,
"motr_lib_init");
642 if (initcall !=
NULL)
646 return M0_ERR_INFO(-EINVAL,
"libname: %s: %s", libname,
747 #undef M0_TRACE_SUBSYSTEM
M0_INTERNAL int m0_reqh_service_state_get(const struct m0_reqh_service *s)
void m0_fom_phase_moveif(struct m0_fom *fom, int32_t rc, int phase0, int phase1)
const struct m0_fom_type_ops ss_process_fom_type_ops
M0_INTERNAL int m0_buf_new_aligned(struct m0_buf *buf, const void *data, uint32_t nob, unsigned shift)
struct m0_be_domain * bs_domain
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
static int ss_bytecount_stats_ingest(struct m0_cob_domain *cdom, struct m0_ss_process_rep *rep)
static struct m0_reqh_service * ss_ioservice_find(struct m0_reqh *reqh)
m0_bcount_t sds_free_blocks
static int ss_fop_process_svc_list_fill(struct m0_ss_process_svc_list_rep *fop, struct m0_reqh *reqh)
M0_INTERNAL struct m0_conf_obj * m0_confc_ctx_result(struct m0_confc_ctx *ctx)
static struct io_request req
static int ss_ios_stats_ingest(struct m0_ss_process_rep *rep)
int(* fo_tick)(struct m0_fom *fom)
uint64_t pc_memlimit_memlock
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
struct m0_be_allocator bs_allocator
struct m0_sm_conf ss_process_fom_conf
#define M0_LOG(level,...)
M0_INTERNAL void m0_reqh_service_prepare_to_stop(struct m0_reqh_service *service)
M0_INTERNAL bool m0_ss_fop_is_process_req(const struct m0_fop *fop)
static int ss_process_reconfig_data_get(struct m0_fom *fom)
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
M0_INTERNAL void m0_ios_cdom_get(struct m0_reqh *reqh, struct m0_cob_domain **out)
static m0_bcount_t segs[NR *IT]
M0_INTERNAL void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
M0_INTERNAL void m0_be_alloc_stats(struct m0_be_allocator *a, struct m0_be_allocator_stats *out)
static void ss_process_fom_fini(struct m0_fom *fom)
enum m0_ha_obj_state isd_ha_state
void * m0_fop_data(const struct m0_fop *fop)
static bool m0_addu64_will_overflow(uint64_t a, uint64_t b)
M0_INTERNAL int32_t m0_confc_ctx_error_lock(const struct m0_confc_ctx *ctx)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL struct m0 * m0_get(void)
M0_INTERNAL void m0_chan_lock(struct m0_chan *ch)
M0_INTERNAL void m0_confc_open_by_fid(struct m0_confc_ctx *ctx, const struct m0_fid *fid)
static int ss_process_counter(struct m0_reqh *reqh, struct m0_ss_process_rep *rep)
static int ss_process_fom_tail(struct m0_fom *fom, int rc)
static int ss_process_quiesce(struct m0_reqh *reqh)
struct m0_rwlock rh_rwlock
struct m0_fop_getxattr_rep * rep
struct m0_fom_type ft_fom_type
M0_INTERNAL struct m0_reqh_service_type * m0_reqh_service_type_find(const char *sname)
static int ss_process_stats(struct m0_reqh *reqh, struct m0_ss_process_rep *rep)
static bool ss_process_confc_ctx_completed(struct m0_fom *fom)
void m0_fom_init(struct m0_fom *fom, const struct m0_fom_type *fom_type, const struct m0_fom_ops *ops, struct m0_fop *fop, struct m0_fop *reply, struct m0_reqh *reqh)
static int ss_process_fom_tick(struct m0_fom *fom)
struct m0_fop_type * f_type
uint64_t pc_memlimit_stack
struct m0_rpc_machine * m0_fop_rpc_machine(const struct m0_fop *fop)
#define M0_ERR_INFO(rc, fmt,...)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
#define M0_FID_TINIT(type, container, key)
#define M0_AMB(obj, ptr, field)
M0_INTERNAL void m0_confc_ctx_fini(struct m0_confc_ctx *ctx)
int m0_fom_tick_generic(struct m0_fom *fom)
static int ss_fop_process_svc_to_buf(struct m0_reqh_service *svc, struct m0_buf *buf)
static struct m0_fom_ops ss_process_fom_ops
void m0_fom_fini(struct m0_fom *fom)
M0_TL_DESCR_DECLARE(seg, M0_EXTERN)
struct m0_reqh_service_type m0_ios_type
static struct m0_stob_domain * dom
struct m0_fop_type m0_fop_process_rep_fopt
struct m0_fop_type m0_fop_process_svc_list_rep_fopt
M0_INTERNAL int m0_confc_ctx_init(struct m0_confc_ctx *ctx, struct m0_confc *confc)
M0_INTERNAL struct m0_ss_process_req * m0_ss_fop_process_req(struct m0_fop *fop)
M0_INTERNAL bool m0_confc_ctx_is_completed_lock(const struct m0_confc_ctx *ctx)
void * m0_alloc(size_t size)
struct m0_bitmap pc_cores
enum m0_conf_service_type isd_srv_type
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
#define M0_CONF_CAST(ptr, type)
M0_INTERNAL struct m0_storage_devs * m0_cs_storage_devs_get(void)
M0_INTERNAL void m0_chan_unlock(struct m0_chan *ch)
M0_INTERNAL void m0_bitmap_copy(struct m0_bitmap *dst, const struct m0_bitmap *src)
M0_INTERNAL int m0_reqh_state_get(struct m0_reqh *reqh)
static int ss_be_segs_stats_ingest(struct m0_be_domain *dom, struct m0_ss_process_rep *rep)
struct m0_conf_obj pc_obj
M0_INTERNAL struct m0_reqh_service * m0_reqh_service_find(const struct m0_reqh_service_type *st, const struct m0_reqh *reqh)
m0_bcount_t sds_block_size
struct m0_reqh_service_type m0_rpc_service_type
struct m0_bitmap pca_core_mask
static struct m0_chan chan[RDWR_REQUEST_MAX]
#define M0_FI_ENABLED(tag)
M0_INTERNAL void m0_storage_dev_space(struct m0_storage_dev *dev, struct m0_storage_space *space)
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
#define M0_ALLOC_PTR(ptr)
static struct m0_net_test_service svc
static int ss_process_reconfig(struct m0_fom *fom)
struct m0_confc_ctx spm_confc_ctx
m0_bcount_t sds_avail_blocks
M0_INTERNAL void m0_rwlock_read_lock(struct m0_rwlock *lock)
static struct m0_fop * fop
#define IS_IN_ARRAY(idx, array)
struct m0_be_seg * rh_beseg
struct m0_proc_attr i_proc_attr
static struct m0_be_seg * seg
M0_INTERNAL void m0_confc_close(struct m0_conf_obj *obj)
static void ss_process_confc_ctx_arm(struct m0_sss_process_fom *pfom)
M0_INTERNAL void m0_rwlock_read_unlock(struct m0_rwlock *lock)
M0_INTERNAL void m0_ss_process_stop_fop_release(struct m0_ref *ref)
M0_INTERNAL int m0_cob_bc_entries_dump(struct m0_cob_domain *cdom, struct m0_buf **out_keys, struct m0_buf **out_recs, uint32_t *out_count)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
m0_bcount_t sds_total_size
struct m0_rpc_machine * ri_rmachine
#define m0_tl_for(name, head, obj)
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
struct m0_fom_callback fo_cb
static int ss_process_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
static int ss_process_health(struct m0_reqh *reqh, int32_t *h)
static struct m0_addb2_frame_header last
static int ss_process_lib_load(struct m0_fom *fom)
M0_INTERNAL struct m0_reqh * m0_fom_reqh(const struct m0_fom *fom)
#define M0_IMPOSSIBLE(fmt,...)
static int ss_process_fom_tick__init(struct m0_fom *fom, const struct m0_reqh *reqh)
static size_t ss_process_fom_home_locality(const struct m0_fom *fom)