23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CAS 152 .sd_name =
"cgc-index-found",
156 .sd_name =
"cgc-credits-get",
160 .sd_name =
"cgc-tree-clean",
164 .sd_name =
"cgc-tree-drop",
168 .sd_name =
"cgc-lock-dead-index",
172 .sd_name =
"cgc-rm-from-dead-index",
176 .sd_name =
"cgc-success",
233 if (
fom->cg_ctg_op_initialized) {
235 fom->cg_ctg_op_initialized =
false;
273 fom->cg_ctg_op_initialized =
true;
324 fom->cg_ctg_op_initialized =
false;
335 fom->cg_ctg, &
fom->cg_del_limit);
349 fom->cg_ctg_op_initialized =
true;
357 fom->cg_ctg_op_initialized =
false;
361 fom->cg_ctg_op_initialized =
true;
367 &
fom->cg_dead_index);
381 fom->cg_ctg_op_initialized =
true;
389 fom->cg_ctg_op_initialized =
true;
399 &
fom->cg_dead_index);
401 fom->cg_ctg_op_initialized =
false;
412 return M0_RC(result);
491 fom->cg_ctg_op_initialized =
false;
493 &
fom->cg_dead_index_addb2);
617 #undef M0_TRACE_SUBSYSTEM
M0_INTERNAL void m0_long_lock_link_init(struct m0_long_lock_link *link, struct m0_fom *fom, struct m0_long_lock_addb2 *addb2)
static void cgc_retry(void)
struct m0_be_domain * bs_domain
M0_INTERNAL void m0_sm_conf_init(struct m0_sm_conf *conf)
static struct cgc_context gc
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
#define M0_FOM_LONG_LOCK_RETURN(rc)
M0_INTERNAL int m0_ctg_delete(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, int next_phase)
static void cgc_fom_fini(struct m0_fom *fom)
#define M0_FOP_TYPE_INIT(ft,...)
M0_INTERNAL struct m0_long_lock * m0_ctg_lock(struct m0_cas_ctg *ctg)
M0_INTERNAL void m0_ctg_store_fini(void)
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
#define M0_LOG(level,...)
M0_INTERNAL void m0_ctg_fini(struct m0_fom *fom, struct m0_cas_ctg *ctg)
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
M0_INTERNAL void m0_ctg_dead_clean_credit(struct m0_be_tx_credit *accum)
void m0_fop_type_fini(struct m0_fop_type *fopt)
M0_INTERNAL void m0_sm_conf_trans_extend(const struct m0_sm_conf *base, struct m0_sm_conf *sub)
M0_INTERNAL void m0_sm_conf_extend(const struct m0_sm_state_descr *base, struct m0_sm_state_descr *sub, uint32_t nr)
M0_INTERNAL int m0_ctg_minkey(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, int next_phase)
M0_INTERNAL bool m0_be_btree_is_empty(struct m0_be_btree *tree)
static void cgc_start_fom(struct m0_fom *fom0, struct m0_fop *fop)
#define container_of(ptr, type, member)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_dead_index(void)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL void m0_cas_gc_wait_async(struct m0_be_op *beop)
const struct m0_sm_conf m0_generic_conf
M0_EXTERN struct m0_reqh_service_type m0_cas_service_type
M0_INTERNAL void m0_cond_init(struct m0_cond *cond, struct m0_mutex *mutex)
struct m0_fom_type ft_fom_type
M0_INTERNAL void m0_cas_gc_init(void)
struct m0_reqh_context rctx
static void cgc_fop_release(struct m0_ref *ref)
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)
M0_INTERNAL bool m0_long_write_lock(struct m0_long_lock *lk, struct m0_long_lock_link *link, int next_phase)
struct m0_fop_type * f_type
M0_INTERNAL void m0_ref_put(struct m0_ref *ref)
struct m0_sm_trans_descr cgc_fom_trans[]
M0_INTERNAL void m0_ctg_try_init(struct m0_cas_ctg *ctg)
static const struct m0_fom_ops cgc_fom_ops
#define M0_AMB(obj, ptr, field)
struct m0_mutex cgc_mutex
struct m0_cas_ctg * cg_ctg
int m0_fom_tick_generic(struct m0_fom *fom)
M0_INTERNAL void m0_long_unlock(struct m0_long_lock *lock, struct m0_long_lock_link *link)
void m0_fom_fini(struct m0_fom *fom)
struct m0_be_seg * rc_beseg
M0_INTERNAL void m0_cond_fini(struct m0_cond *cond)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
M0_INTERNAL void m0_long_lock_link_fini(struct m0_long_lock_link *link)
static struct m0_sm_state_descr cgc_fom_phases[]
static const struct m0_fom_type_ops cgc_fom_type_ops
M0_INTERNAL struct m0_reqh_context * m0_cs_reqh_context(struct m0_reqh *reqh)
M0_INTERNAL int m0_ctg_store_init(struct m0_be_domain *dom)
static struct m0_stob_domain * dom
struct m0_be_tx_credit tx_betx_cred
M0_INTERNAL void m0_cas_gc_fini(void)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL struct m0_be_domain * m0_cas__ut_svc_be_get(struct m0_reqh_service *svc)
M0_INTERNAL void m0_be_op_done(struct m0_be_op *op)
M0_INTERNAL void m0_cas_gc_wait_sync(void)
static int cgc_fom_tick(struct m0_fom *fom)
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
M0_INTERNAL void m0_ctg_op_init(struct m0_ctg_op *ctg_op, struct m0_fom *fom, uint32_t flags)
M0_INTERNAL bool m0_long_is_write_locked(struct m0_long_lock *lock, const struct m0_fom *fom)
M0_INTERNAL void m0_cond_wait(struct m0_cond *cond)
M0_INTERNAL void m0_be_op_active(struct m0_be_op *op)
struct m0_ctg_op cg_ctg_op
struct m0_sm_state_descr * scf_state
#define M0_FI_ENABLED(tag)
#define M0_ALLOC_PTR(ptr)
bool cg_ctg_op_initialized
struct m0_sm_trans_descr m0_generic_phases_trans[]
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
static struct m0_fop * fop
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
struct m0_long_lock_link cg_dead_index
void(* fo_fini)(struct m0_fom *fom)
M0_INTERNAL void m0_cond_broadcast(struct m0_cond *cond)
M0_INTERNAL void m0_ctg_op_fini(struct m0_ctg_op *ctg_op)
M0_INTERNAL void m0_cas_gc_start(struct m0_reqh_service *service)
M0_INTERNAL int m0_ctg_drop(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, int next_phase)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
M0_INTERNAL void m0_sm_conf_fini(struct m0_sm_conf *conf)
static struct m0_sm_conf cgc_sm_conf
static size_t cgc_fom_home_locality(const struct m0_fom *fom)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
M0_INTERNAL int m0_ctg_truncate(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, m0_bcount_t limit, int next_phase)
M0_INTERNAL int m0_ctg_op_rc(struct m0_ctg_op *ctg_op)
M0_INTERNAL struct m0_fop_type cgc_fake_fopt
struct m0_long_lock_addb2 cg_dead_index_addb2
M0_INTERNAL void m0_ctg_drop_credit(struct m0_fom *fom, struct m0_be_tx_credit *accum, struct m0_cas_ctg *ctg, m0_bcount_t *limit)