23 #undef M0_TRACE_SUBSYSTEM 24 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_RM 127 .sd_name =
"RM_Request_Begin",
133 .sd_name =
"RM_Credit_Get",
137 .sd_name =
"RM_Request_Wait",
142 .sd_name =
"RM_Request_Completion",
146 .sd_name =
"Debtor_Subscribe",
401 M0_ENTRY(
"prepare remote incoming request for fom: %p request: %d",
533 return M0_RC(-EEXIST);
574 if (debtor ==
NULL) {
struct m0_rm_ha_subscriber rf_sbscr
struct m0_rm_fop_credit br_credit
static struct m0_fom_ops rm_fom_borrow_ops
M0_INTERNAL void m0_fom_wakeup(struct m0_fom *fom)
struct m0_rm_fop_loan fc_loan
static struct m0_fom_ops rm_fom_revoke_ops
struct m0_uint128 bo_group_id
enum m0_rm_remote_state rem_state
struct m0_rm_fop_owner rrq_owner
int const char const void size_t int flags
M0_INTERNAL int m0_rm_ha_subscriber_init(struct m0_rm_ha_subscriber *sbscr, struct m0_sm_group *grp, struct m0_confc *confc, const char *rem_ep, struct m0_rm_ha_tracker *tracker)
struct m0_cookie ri_rem_owner_cookie
enum m0_rm_incoming_type rin_type
struct m0_rm_fop_req fr_base
struct m0_clink rem_rev_sess_clink
static int revoke_fom_tick(struct m0_fom *)
static size_t locality(const struct m0_fom *fom)
static int debtor_subscription_check(struct m0_fom *fom)
void(* rio_complete)(struct m0_rm_incoming *in, int32_t rc)
M0_INTERNAL int m0_rm_credit_decode(struct m0_rm_credit *credit, struct m0_buf *buf)
#define M0_LOG(level,...)
struct m0_cookie ri_loan_cookie
static void remote_incoming_conflict(struct m0_rm_incoming *in)
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
static int revoke_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
struct m0_rm_ha_tracker rem_tracker
void * m0_fop_data(const struct m0_fop *fop)
struct m0_fop_type m0_rm_fop_borrow_rep_fopt
struct m0_rm_fop_credit rrq_credit
static int remote_create(struct m0_rm_remote **rem, struct m0_rm_remote_incoming *rem_in)
const struct m0_fom_type_ops rm_cancel_fom_type_ops
static int borrow_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
M0_INTERNAL bool m0_clink_is_armed(const struct m0_clink *link)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL void m0_rm_remote_init(struct m0_rm_remote *rem, struct m0_rm_resource *res)
M0_INTERNAL int m0_rm_reverse_session_get(struct m0_rm_remote_incoming *rem_in, struct m0_rm_remote *remote)
void m0_remotes_tlist_add(struct m0_tl *tl, struct m0_rm_remote *rem)
const struct m0_fom_type_ops rm_borrow_fom_type_ops
#define container_of(ptr, type, member)
struct m0_rm_credit rin_want
struct m0_rpc_session * rem_session
static int cancel_fom_tick(struct m0_fom *)
static struct m0_rpc_item * item
struct m0_cookie ri_owner_cookie
M0_INTERNAL int m0_rm_credit_encode(struct m0_rm_credit *credit, struct m0_buf *buf)
struct m0_rm_owner * cr_owner
struct m0_cookie br_creditor_cookie
static void cancel_fom_fini(struct m0_fom *fom)
struct m0_fom_type ft_fom_type
M0_INTERNAL int m0_rm_svc_owner_create(struct m0_reqh_service *service, struct m0_rm_owner **out, struct m0_buf *resbuf)
static int cancel_process(struct m0_fom *fom)
struct m0_cookie lo_cookie
static struct m0_fom_ops rm_fom_cancel_ops
struct m0_rm_fop_req bo_base
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)
struct m0_rm_credit rl_credit
struct m0_fop_type * f_type
M0_INTERNAL void m0_rm_ha_subscribe(struct m0_rm_ha_subscriber *sbscr)
static int incoming_prepare(enum m0_rm_incoming_type type, struct m0_fom *fom)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL int m0_rm_loan_settle(struct m0_rm_owner *owner, struct m0_rm_loan *loan)
static enum m0_rm_owner_state owner_state(const struct m0_rm_owner *owner)
M0_INTERNAL void m0_rm_incoming_init(struct m0_rm_incoming *in, struct m0_rm_owner *owner, enum m0_rm_incoming_type type, enum m0_rm_incoming_policy policy, uint64_t flags)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
M0_INTERNAL struct m0_reqh_service * m0_reqh_rpc_service_find(struct m0_reqh *reqh)
static void borrow_fom_fini(struct m0_fom *fom)
struct m0_fid rrq_orig_owner
void m0_fom_fini(struct m0_fom *fom)
static void request_fom_fini(struct m0_fom *fom)
static struct m0_confc * confc
static enum m0_rm_incoming_state incoming_state(const struct m0_rm_incoming *in)
#define M0_RM_REMOTE_PUT(remote)
static int request_post_process(struct m0_fom *fom)
static struct m0_fop reply_fop
struct m0_sm_state_descr rm_req_phases[]
static int cancel_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
const struct m0_rm_incoming_ops * rin_ops
#define m0_cookie_of(cookie, type, field)
M0_INTERNAL struct m0_rpc_session * m0_rpc_service_reverse_session_lookup(struct m0_reqh_service *service, const struct m0_rpc_item *item)
M0_INTERNAL void m0_cookie_init(struct m0_cookie *cookie, const uint64_t *obj)
struct m0_cookie ow_cookie
const struct m0_fom_type_ops rm_revoke_fom_type_ops
struct m0_rm_remote * rl_other
void m0_rpc_reply_post(struct m0_rpc_item *request, struct m0_rpc_item *reply)
static struct m0_rm_resource * incoming_to_resource(struct m0_rm_incoming *in)
struct m0_rm_remote * rin_remote
const struct m0_sm_conf borrow_sm_conf
struct m0_fop_type m0_fop_generic_reply_fopt
M0_INTERNAL int m0_rm_revoke_commit(struct m0_rm_remote_incoming *rem_in)
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
struct m0_rm_fop_loan fr_loan
static int request_pre_process(struct m0_fom *fom, enum m0_rm_incoming_type type)
struct m0_rm_fop_owner bo_creditor
M0_INTERNAL void m0_rm_credit_put(struct m0_rm_incoming *in)
static int rfom_debtor_subscribe(struct rm_request_fom *rfom, struct m0_rm_remote *debtor)
static int request_fom_create(enum m0_rm_incoming_type type, struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
#define M0_RM_REMOTE_GET(remote)
struct m0_cookie rr_debtor_cookie
struct m0_rm_incoming ri_incoming
#define M0_FI_ENABLED(tag)
struct m0_cookie fc_creditor_cookie
struct m0_rm_fop_loan br_loan
#define M0_ALLOC_PTR(ptr)
struct m0_buf ow_resource
M0_INTERNAL void m0_rm_ha_subscriber_fini(struct m0_rm_ha_subscriber *sbscr)
M0_INTERNAL int m0_rpc_service_reverse_session_get(struct m0_reqh_service *service, const struct m0_rpc_item *item, struct m0_clink *clink, struct m0_rpc_session **session)
static struct m0_rm_remote * remote
struct m0_rpc_session * ri_session
struct m0_rpc_item * m0_fop_to_rpc_item(const struct m0_fop *fop)
static struct m0_fop * fop
static void remote_incoming_complete(struct m0_rm_incoming *in, int32_t rc)
static struct m0_rm_incoming_ops remote_incoming_ops
M0_INTERNAL void m0_rm_incoming_fini(struct m0_rm_incoming *in)
M0_INTERNAL void m0_rm_owner_unlock(struct m0_rm_owner *owner)
void(* fo_fini)(struct m0_fom *fom)
const struct m0_sm_conf canoke_sm_conf
struct m0_cookie rem_cookie
void m0_fom_phase_set(struct m0_fom *fom, int phase)
M0_INTERNAL void m0_rm_owner_lock(struct m0_rm_owner *owner)
struct m0_uint128 cr_group_id
M0_INTERNAL struct m0_rm_remote * m0_rm_remote_find(struct m0_rm_remote_incoming *rem_in)
static int reply_prepare(const enum m0_rm_incoming_type type, struct m0_fom *fom)
static int borrow_fom_tick(struct m0_fom *)
struct m0_uint128 ri_group_id
struct m0_rpc_machine * ri_rmachine
static void reply_err_set(enum m0_rm_incoming_type type, struct m0_fom *fom, int rc)
struct m0_fop_type m0_rm_fop_revoke_rep_fopt
M0_INTERNAL int m0_rm_borrow_commit(struct m0_rm_remote_incoming *rem_in)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
struct m0_clink rht_clink
struct m0_rm_reserve_prio rin_reserve
static void revoke_fom_fini(struct m0_fom *fom)
M0_INTERNAL void m0_rm_credit_get(struct m0_rm_incoming *in)
M0_INTERNAL const char * m0_rpc_item_remote_ep_addr(const struct m0_rpc_item *item)
struct m0_rm_remote_incoming rf_in
#define M0_IMPOSSIBLE(fmt,...)
static int request_fom_tick(struct m0_fom *fom, enum m0_rm_incoming_type type)