28 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_RM 73 .rst_typecode = M0_CST_RMS,
87 .ft_name =
"rm owner fid" 131 m0_reqh_rm_service_bob_init(rms);
147 m0_reqh_rm_service_bob_fini(rms);
219 M0_PRE(m0_owners_tlist_length(&
res->r_local) <= 1);
221 return m0_owners_tlist_head(&
res->r_local);
261 if (resadd ==
NULL) {
272 if (owner !=
NULL && ow_cr !=
NULL) {
318 #undef M0_TRACE_SUBSYSTEM const struct m0_rm_credit_ops * cr_ops
static int rms_start(struct m0_reqh_service *service)
#define M0_BUFVEC_INIT_BUF(addr_ptr, count_ptr)
M0_INTERNAL void m0_rms_unregister(void)
static int rms_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
M0_INTERNAL int m0_rm_owner_selfadd(struct m0_rm_owner *owner, struct m0_rm_credit *r)
struct m0_rm_resource_type * r_type
int(* rso_start)(struct m0_reqh_service *service)
M0_INTERNAL struct m0_rm_domain * m0_rm_svc_domain_get(const struct m0_reqh_service *svc)
const m0_time_t M0_TIME_NEVER
static void rms_resources_free(struct m0_rm_resource_type *rtype)
M0_INTERNAL struct m0_rm_resource_type * m0_rm_resource_type_lookup(const struct m0_rm_domain *dom, const uint64_t rtype_id)
M0_BOB_DEFINE(M0_INTERNAL, &rms_bob, m0_reqh_rm_service)
struct m0_reqh_service rms_svc
M0_INTERNAL void m0_rm_domain_init(struct m0_rm_domain *dom)
static const struct m0_reqh_service_ops rms_ops
int m0_reqh_service_type_register(struct m0_reqh_service_type *rstype)
M0_INTERNAL int m0_rm_owner_timedwait(struct m0_rm_owner *owner, uint64_t state, const m0_time_t abs_timeout)
M0_INTERNAL int m0_rm_svc_owner_create(struct m0_reqh_service *service, struct m0_rm_owner **out, struct m0_buf *resbuf)
M0_INTERNAL void m0_file_lock_type_deregister(struct m0_rm_resource_type *flock_rt)
static struct m0_rm_owner * rmsvc_owner(const struct m0_rm_resource *res)
M0_INTERNAL int m0_file_lock_type_register(struct m0_rm_domain *dom, struct m0_rm_resource_type *flock_rt)
struct m0_rm_domain rms_dom
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_copyfrom(struct m0_bufvec_cursor *scur, void *ddata, m0_bcount_t num_bytes)
static const struct m0_bob_type rms_bob
static const struct m0_reqh_service_type_ops rms_type_ops
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_fid_type_register(const struct m0_fid_type *fidt)
static const struct socktype stype[]
#define m0_tl_teardown(name, head, obj)
const struct m0_uint128 m0_rm_no_group
M0_INTERNAL void m0_rm_owner_init_rfid(struct m0_rm_owner *owner, const struct m0_uint128 *group, struct m0_rm_resource *res, struct m0_rm_remote *creditor)
M0_INTERNAL void m0_rm_owner_fini(struct m0_rm_owner *owner)
#define bob_of(ptr, type, field, bt)
M0_INTERNAL void m0_bufvec_cursor_init(struct m0_bufvec_cursor *cur, const struct m0_bufvec *bvec)
M0_INTERNAL void m0_rw_lockable_type_deregister(struct m0_rm_resource_type *rtype)
int(* rto_decode)(struct m0_bufvec_cursor *cur, struct m0_rm_resource **resource)
M0_INTERNAL void m0_fid_type_unregister(const struct m0_fid_type *fidt)
static const struct m0_fid_type owner_fid_type
M0_INTERNAL void m0_rm_resource_free(struct m0_rm_resource *res)
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
struct m0_reqh_service_type m0_rms_type
M0_INTERNAL void m0_rm_resource_add(struct m0_rm_resource_type *rtype, struct m0_rm_resource *res)
int(* rsto_service_allocate)(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
M0_INTERNAL int m0_rm_fop_init(void)
M0_INTERNAL void m0_rm_credit_init(struct m0_rm_credit *credit, struct m0_rm_owner *owner)
M0_INTERNAL void m0_rm_remote_fini(struct m0_rm_remote *rem)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL int m0_rms_register(void)
static void rms_stop(struct m0_reqh_service *service)
M0_INTERNAL void m0_rm_owner_windup(struct m0_rm_owner *owner)
static struct m0_net_test_service svc
const struct m0_rm_resource_type_ops * rt_ops
void(* cro_initial_capital)(struct m0_rm_credit *self)
struct m0_rm_resource_type rms_flock_rt
M0_INTERNAL void m0_rm_credit_fini(struct m0_rm_credit *credit)
#define m0_tl_for(name, head, obj)
struct m0_rm_resource_type rms_rwlockable_rt
void m0_reqh_service_type_unregister(struct m0_reqh_service_type *rstype)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
M0_INTERNAL int m0_rw_lockable_type_register(struct m0_rm_domain *dom, struct m0_rm_resource_type *rtype)
M0_INTERNAL void m0_rm_domain_fini(struct m0_rm_domain *dom)
#define offsetof(typ, memb)
static void rms_fini(struct m0_reqh_service *service)
M0_INTERNAL void m0_rm_resource_del(struct m0_rm_resource *res)
M0_INTERNAL void m0_rm_fop_fini(void)
struct m0_tl rt_resources
M0_INTERNAL struct m0_rm_resource * m0_rm_resource_find(const struct m0_rm_resource_type *rt, const struct m0_rm_resource *res)
const struct m0_reqh_service_ops * rs_ops