25 #ifndef __MOTR_FOP_FOP_H__ 26 #define __MOTR_FOP_FOP_H__ 184 #define M0_FOP_DEFAULT_ITEM_TYPE_OPS \ 185 .rito_encode = m0_fop_item_type_default_encode, \ 186 .rito_decode = m0_fop_item_type_default_decode, \ 187 .rito_payload_size = m0_fop_payload_size, \ 188 .rito_item_get = m0_fop_item_get, \ 189 .rito_item_put = m0_fop_item_put 307 #define M0_FOP_TYPE_INIT(ft, ...) \ 308 m0_fop_type_init((ft), &(const struct __m0_fop_type_init_args) { \ 316 #define M0_FOP_TYPE_INIT2_DECL struct __m0_fop_type_init_args __args 317 #define M0_FOP_TYPE_INIT2(ft, ...) ({ \ 318 __args = (struct __m0_fop_type_init_args) {__VA_ARGS__}; \ 319 m0_fop_type_init((ft), &__args); }) 334 #define M0_FOP_XCODE_OBJ(f) (struct m0_xcode_obj) { \ 335 .xo_type = f->f_type->ft_xt, \ 336 .xo_ptr = m0_fop_data(f), \
const struct m0_rpc_item_type_ops m0_fop_default_item_type_ops
uint32_t m0_fop_opcode(const struct m0_fop *fop)
static struct buffer * cur(struct m0_addb2_mach *mach, m0_bcount_t space)
static struct io_request req
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
int(* fto_io_coalesce)(struct m0_fop *fop, uint64_t rpc_size)
void fop_release(struct m0_ref *ref)
const struct m0_xcode_type * ft_xt
void m0_fop_type_addb2_deinstrument(struct m0_fop_type *type)
void * m0_fop_data(const struct m0_fop *fop)
void m0_fop_type_fini(struct m0_fop_type *fopt)
static struct m0_addb2_mach * mach
static struct m0_rpc_item * item
struct m0_fop_getxattr_rep * rep
M0_INTERNAL struct m0_fop_type * m0_fop_type_next(struct m0_fop_type *ftype)
struct m0_fol_frag_type m0_fop_fol_frag_type
M0_INTERNAL void m0_fops_fini(void)
struct m0_fom_type ft_fom_type
void m0_fop_put0_lock(struct m0_fop *fop)
void m0_fop_rpc_machine_set(struct m0_fop *fop, struct m0_rpc_machine *mach)
struct m0_fop_type * f_type
struct m0_rpc_machine * m0_fop_rpc_machine(const struct m0_fop *fop)
M0_INTERNAL const char * m0_fop_name(const struct m0_fop *fop)
struct m0_tlink ft_linkage
void(* fto_io_desc_get)(struct m0_fop *fop, struct m0_net_buf_desc_data **desc)
M0_INTERNAL int m0_fop_fol_add(struct m0_fop *fop, struct m0_fop *rep, struct m0_dtx *dtx)
struct __m0_fop_type_init_args tb_args
M0_INTERNAL int m0_fop_rep_xc_type(const struct m0_xcode_obj *par, const struct m0_xcode_type **out)
struct m0_rpc_machine * m0_fop_session_machine(const struct m0_rpc_session *s)
struct m0_fop * m0_fop_get(struct m0_fop *fop)
M0_INTERNAL struct m0_fop_type * m0_item_type_to_fop_type(const struct m0_rpc_item_type *item_type)
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
M0_INTERNAL int m0_fops_init(void)
M0_INTERNAL int m0_fop_xc_type(const struct m0_xcode_obj *par, const struct m0_xcode_type **out)
uint32_t m0_fop_type_code_t
M0_INTERNAL struct m0_fop_type * m0_fop_type_find(uint32_t opcode)
struct m0_fop * m0_fop_reply_alloc(struct m0_fop *req, struct m0_fop_type *rept)
const struct m0_rpc_item_type_ops * rpc_ops
struct m0_fop_data f_data
void m0_fop_type_init(struct m0_fop_type *ft, const struct __m0_fop_type_init_args *args)
int(* fto_redo)(struct m0_fop_fol_frag *ffrag, struct m0_fol *fol)
void *ffrp_fop M0_XCA_OPAQUE("m0_fop_xc_type")
const struct m0_fom_type_ops * fom_ops
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
void m0_fop_put0(struct m0_fop *fop)
struct m0_net_domain * m0_fop_domain_get(const struct m0_fop *fop)
const struct m0_reqh_service_type * svc_type
int m0_fop_type_addb2_instrument(struct m0_fop_type *type)
const struct m0_fop_type_ops * ft_ops
struct m0_rpc_item * m0_fop_to_rpc_item(const struct m0_fop *fop)
struct m0_fop * m0_fop_alloc_at(struct m0_rpc_session *sess, struct m0_fop_type *fopt)
M0_INTERNAL void m0_fop_type_init_nr(const struct m0_fop_type_batch *batch)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
M0_INTERNAL int m0_fop_encdec(struct m0_fop *fop, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
struct m0_rpc_item_type ft_rpc_item_type
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
void(* fto_fop_replied)(struct m0_fop *fop, struct m0_fop *bfop)
static struct m0_fop_type * ft[]
struct m0_fop_type * tb_type
static struct m0_addb2_source * s
void m0_fop_put(struct m0_fop *fop)
struct m0_rpc_item f_item
const struct m0_xcode_type * xt
M0_INTERNAL void m0_fop_type_fini_nr(const struct m0_fop_type_batch *batch)
int(* fto_undo)(struct m0_fop_fol_frag *ffrag, struct m0_fol *fol)
struct m0_net_transfer_mc * m0_fop_tm_get(const struct m0_fop *fop)
const struct m0_sm_conf * sm
struct m0_fop * m0_fop_alloc(struct m0_fop_type *fopt, void *data, struct m0_rpc_machine *mach)
const struct m0_fop_type_ops * fop_ops