29 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE 64 #define BE_ACTIVE_RECORD_ID "0000" 66 .
b0_name =
"M0_BE:ACTIVE_RECORD",
77 *
reqh =
dom->bd_cfg.bc_engine.bec_reqh;
80 M0_ENTRY(
"suffix: %s, data: %p, adom: %p", suffix,
data->b_addr, adom);
85 m0_reqh_lockers_set(
reqh,
key, adom);
151 const struct m0_buf *path)
159 ard_be_list_create(&(*dom)->ard_list, tx);
166 rds_be_list_create(&sub->
rds_list, tx);
167 ard_be_tlink_create(sub, tx);
168 ard_be_list_add(&(*dom)->ard_list, tx, sub);
205 rds_be_list_destroy(&sub->
rds_list, tx);
206 ard_be_tlink_destroy(sub, tx);
237 ard_be_list_credit(
M0_BLO_ADD, subsys_nr, accum);
250 ard_be_list_credit(
M0_BLO_DEL, subsys_nr, accum);
289 rds_be_tlink_create(*rec, tx);
299 rds_be_tlink_destroy(rec, tx);
359 return M0_RC(-ENOENT);
361 rds_be_list_add(&sub->
rds_list, tx, rec);
375 return M0_RC(-ENOENT);
377 rds_be_list_del(&sub->
rds_list, tx, rec);
382 #undef M0_TRACE_SUBSYSTEM
#define M0_BE_ALLOC_CREDIT_PTR(ptr, seg, accum)
struct m0_be_domain * bs_domain
struct m0_be_list ard_list
#define M0_BE_ALLOC_PTR_SYNC(ptr, seg, tx)
void m0_be_0type_add_credit(struct m0_be_domain *dom, const struct m0_be_0type *zt, const char *suffix, const struct m0_buf *data, struct m0_be_tx_credit *credit)
M0_BE_LIST_DESCR_DEFINE(ard, "list of ar_domain_subsystem in ar_domain", static, struct m0_be_active_record_domain_subsystem, rds_link, rds_magic, M0_BE_ACT_REC_DOM_MAGIC, M0_BE_ACT_REC_DOM_MAGIC)
M0_INTERNAL bool m0_be_active_record_domain__invariant(struct m0_be_active_record_domain *dom)
M0_INTERNAL bool m0_buf_eq(const struct m0_buf *x, const struct m0_buf *y)
#define M0_BE_ALLOC_CREDIT_ARR(arr, nr, seg, accum)
void m0_be_0type_del_credit(struct m0_be_domain *dom, const struct m0_be_0type *zt, const char *suffix, struct m0_be_tx_credit *credit)
M0_INTERNAL void m0_be_active_record_domain_fini(struct m0_be_active_record_domain *dom)
m0_be_active_record_domain_op
M0_INTERNAL void m0_be_active_record_domain_init(struct m0_be_active_record_domain *dom, struct m0_be_seg *seg)
unsigned i_actrec_dom_key
M0_INTERNAL int m0_be_active_record_del(const char *subsys, struct m0_be_active_record *rec, struct m0_be_tx *tx)
#define M0_BE_TX_CAPTURE_PTR(seg, tx, ptr)
M0_INTERNAL struct m0 * m0_get(void)
#define M0_BE_TX_CREDIT_TYPE(type)
M0_BE_LIST_DEFINE(ard, static, struct m0_be_active_record_domain_subsystem)
M0_INTERNAL void m0_be_active_record_credit(struct m0_be_active_record *rec, enum m0_be_active_record_op op, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_be_active_record_destroy(struct m0_be_active_record *rec, struct m0_be_tx *tx)
static struct m0_be_active_record_domain * dom
M0_INTERNAL int m0_be_active_record_add(const char *subsys, struct m0_be_active_record *rec, struct m0_be_tx *tx)
M0_INTERNAL void m0_be_tx_credit_mac(struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c1, m0_bcount_t k)
struct m0_be_0type m0_be_active_record0
static void active_record0_fini(struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data)
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
static struct m0_be_active_record_domain_subsystem * be_active_record__subsystem_lookup(struct m0_be_active_record_domain *dom, const char *subsys)
M0_INTERNAL void m0_be_tx_credit_add(struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL int m0_be_active_record_domain__create(struct m0_be_active_record_domain **dom, struct m0_be_tx *tx, struct m0_be_seg *seg, const struct m0_buf *path)
struct m0_be_active_record_domain * ar_dom
#define M0_BE_FREE_PTR_SYNC(ptr, seg, tx)
M0_INTERNAL void m0_be_active_record_domain_credit(struct m0_be_active_record_domain *dom, enum m0_be_active_record_domain_op op, uint8_t subsys_nr, struct m0_be_tx_credit *accum)
int m0_be_0type_add(struct m0_be_0type *zt, struct m0_be_domain *dom, struct m0_be_tx *tx, const char *suffix, const struct m0_buf *data)
#define BE_ACTIVE_RECORD_ID
M0_INTERNAL void m0_be_active_record_init(struct m0_be_active_record *rec, struct m0_be_active_record_domain *ar_dom)
#define M0_BUF_INIT_PTR(p)
int m0_be_0type_del(struct m0_be_0type *zt, struct m0_be_domain *dom, struct m0_be_tx *tx, const char *suffix)
M0_INTERNAL int m0_be_active_record_domain_destroy(struct m0_be_active_record_domain *dom, struct m0_be_tx *tx)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
struct m0_be_list rds_list
static struct m0_be_seg * seg
#define M0_ASSERT_INFO(cond, fmt,...)
static int active_record0_init(struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data)
M0_INTERNAL bool m0_be_active_record__invariant(struct m0_be_active_record *rec)
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
struct m0_be_seg * ard_seg
M0_INTERNAL void m0_be_active_record_fini(struct m0_be_active_record *rec)
#define M0_BE_FREE_CREDIT_ARR(arr, nr, seg, accum)
#define M0_BE_FREE_CREDIT_PTR(ptr, seg, accum)
M0_INTERNAL int m0_be_active_record_create(struct m0_be_active_record **rec, struct m0_be_tx *tx, struct m0_be_active_record_domain *ar_dom)