23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CM 73 .sd_name =
"copy machine ag store init",
79 .sd_name =
"ag store init wait",
85 .sd_name =
"ag store start",
95 .sd_name =
"Update wait",
101 .sd_name =
"Update complete",
112 .
scf_name =
"sm: store update conf",
136 sprintf(ag_store,
"ag_store_%llu", (
unsigned long long)
cm->
cm_id);
165 sprintf(ag_store,
"ag_store_%llu", (
unsigned long long)
cm->
cm_id);
171 }
else if (
rc == -ENOENT) {
223 if (
rc == 0 ||
rc == -ENOENT) {
298 return M0_ERR_INFO(
rc,
"Cannot load ag store, status=%d phase=%d",
332 return M0_ERR_INFO(
rc,
"Cannot load ag store, status=%d phase=%d",
355 &
fom->fo_loc->fl_group);
433 return M0_ERR_INFO(
rc,
"Cannot load ag store, status=%d phase=%d",
436 sprintf(ag_store,
"ag_store_%llu", (
unsigned long long)
cm->
cm_id);
440 &
fom->fo_loc->fl_group);
547 #undef M0_TRACE_SUBSYSTEM
#define M0_BE_ALLOC_CREDIT_PTR(ptr, seg, accum)
struct m0_be_domain * bs_domain
M0_INTERNAL void m0_cm_lock(struct m0_cm *cm)
#define M0_BE_ALLOC_PTR_SYNC(ptr, seg, tx)
const struct m0_cm_type * cm_type
M0_INTERNAL int m0_be_seg_dict_insert(struct m0_be_seg *seg, struct m0_be_tx *tx, const char *name, void *value)
static struct m0_sm_state_descr ag_store_update_sd[AG_STORE_NR]
#define M0_LOG(level,...)
struct m0_fom_type ct_ag_store_fomt
M0_INTERNAL void m0_be_tx_fini(struct m0_be_tx *tx)
M0_INTERNAL void m0_dtx_init(struct m0_dtx *tx, struct m0_be_domain *be_domain, struct m0_sm_group *sm_group)
M0_INTERNAL void m0_dtx_opened(struct m0_dtx *tx)
static struct m0_cm_ag_store * fom2store(struct m0_fom *fom)
enum m0_cm_ag_store_status s_status
M0_INTERNAL void m0_be_tx_prep(struct m0_be_tx *tx, const struct m0_be_tx_credit *credit)
#define M0_BE_TX_CAPTURE_PTR(seg, tx, ptr)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
#define container_of(ptr, type, member)
#define M0_BE_TX_CREDIT_TYPE(type)
M0_INTERNAL void m0_cm_sw_update_start(struct m0_cm *cm)
static int ag_store_init(struct m0_cm_ag_store *store)
const struct m0_fom_type * fo_type
M0_INTERNAL void m0_cm_ag_store_fini(struct m0_cm_ag_store *store)
M0_INTERNAL void m0_cm_unlock(struct m0_cm *cm)
static const struct m0_fom_type_ops ag_store_update_fom_type_ops
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)
#define M0_ERR_INFO(rc, fmt,...)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL int m0_be_seg_dict_delete(struct m0_be_seg *seg, struct m0_be_tx *tx, const char *name)
static int ag_store__update(struct m0_cm_ag_store *store)
M0_INTERNAL void m0_dtx_open(struct m0_dtx *tx)
static int ag_store_init_wait(struct m0_cm_ag_store *store)
void m0_fom_fini(struct m0_fom *fom)
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
static int ag_store_start(struct m0_cm_ag_store *store)
M0_INTERNAL void m0_fom_type_init(struct m0_fom_type *type, uint64_t id, const struct m0_fom_type_ops *ops, const struct m0_reqh_service_type *svc_type, const struct m0_sm_conf *sm)
static int ag_store_update(struct m0_cm_ag_store *store)
struct m0_be_tx_credit tx_betx_cred
static int ag_store_init_load(struct m0_cm_ag_store *store, struct m0_cm_ag_store_data **data)
M0_INTERNAL void m0_be_tx_close(struct m0_be_tx *tx)
static int ag_store_fom_tick(struct m0_fom *fom)
static struct m0_cm * store2cm(struct m0_cm_ag_store *store)
M0_INTERNAL void m0_dtx_fini(struct m0_dtx *tx)
struct m0_cm_ag_id cm_last_out_hi
M0_INTERNAL void m0_dtx_done(struct m0_dtx *tx)
#define M0_BE_FREE_PTR_SYNC(ptr, seg, tx)
struct m0_chan cm_complete
struct m0_chan cm_proxy_init_wait
M0_INTERNAL void m0_chan_signal_lock(struct m0_chan *chan)
struct m0_cm_ag_id cm_last_processed_out
M0_INTERNAL void m0_be_tx_init(struct m0_be_tx *tx, uint64_t tid, struct m0_be_domain *dom, struct m0_sm_group *sm_group, m0_be_tx_cb_t persistent, m0_be_tx_cb_t discarded, void(*filler)(struct m0_be_tx *tx, void *payload), void *datum)
static int ag_store_complete(struct m0_cm_ag_store *store)
M0_INTERNAL void m0_be_seg_dict_delete_credit(struct m0_be_seg *seg, const char *name, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_cm_ag_store_init(struct m0_cm_type *cmtype)
static void ag_store_fom_fini(struct m0_fom *fom)
M0_INTERNAL void m0_cm_notify(struct m0_cm *cm)
struct m0_cm_ag_store_data s_data
static int(* ag_store_action[])(struct m0_cm_ag_store *store)
static void in_out_set(struct m0_cm *cm, struct m0_cm_ag_store *store, struct m0_cm_ag_store_data *s_data)
struct m0_reqh_service cm_service
M0_INTERNAL void m0_be_tx_open(struct m0_be_tx *tx)
M0_INTERNAL void m0_cm_proxies_init_wait(struct m0_cm *cm, struct m0_fom *fom)
M0_INTERNAL bool m0_cm_ag_store_is_complete(struct m0_cm_ag_store *store)
enum m0_dtx_state tx_state
struct m0_be_seg * rh_beseg
struct m0_reqh_service_type ct_stype
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
static struct m0_be_seg * seg
void(* fo_fini)(struct m0_fom *fom)
static int ag_store_update_wait(struct m0_cm_ag_store *store)
ag_store_update_fom_phase
void m0_fom_phase_set(struct m0_fom *fom, int phase)
M0_INTERNAL void m0_cm_ag_store_complete(struct m0_cm_ag_store *store)
M0_INTERNAL void m0_be_seg_dict_insert_credit(struct m0_be_seg *seg, const char *name, struct m0_be_tx_credit *accum)
static uint64_t ag_store_fom_locality(const struct m0_fom *fom)
M0_INTERNAL void m0_cm_ag_store_fom_start(struct m0_cm *cm)
M0_INTERNAL int m0_be_seg_dict_lookup(struct m0_be_seg *seg, const char *name, void **out)
static int ag_store_alloc(struct m0_cm_ag_store *store)
static const struct m0_fom_ops ag_store_update_fom_ops
struct m0_sm_conf ag_store_update_conf
#define M0_BE_FREE_CREDIT_PTR(ptr, seg, accum)
struct m0_cm_ag_store cm_ag_store
struct m0_cm_ag_id cm_sw_last_updated_hi
#define M0_IMPOSSIBLE(fmt,...)