Motr  M0
m0_rpc_item_type_ops Struct Reference

#include <item.h>

Collaboration diagram for m0_rpc_item_type_ops:
Collaboration graph

Data Fields

m0_bcount_t(* rito_payload_size )(const struct m0_rpc_item *item)
 
bool(* rito_eq )(const struct m0_rpc_item *i1, const struct m0_rpc_item *i2)
 
void(* rito_io_coalesce )(struct m0_rpc_item *head, struct m0_list *list, uint64_t size)
 
int(* rito_encode )(const struct m0_rpc_item_type *item_type, struct m0_rpc_item *item, struct m0_bufvec_cursor *cur)
 
int(* rito_decode )(const struct m0_rpc_item_type *item_type, struct m0_rpc_item **item, struct m0_bufvec_cursor *cur)
 
bool(* rito_try_merge )(struct m0_rpc_item *container, struct m0_rpc_item *component, m0_bcount_t limit)
 
void(* rito_item_get )(struct m0_rpc_item *item)
 
void(* rito_item_put )(struct m0_rpc_item *item)
 
int(* rito_deliver )(struct m0_rpc_machine *rpcmach, struct m0_rpc_item *item)
 

Detailed Description

For default implementations of these interfaces for fops

See also
M0_FOP_DEFAULT_ITEM_TYPE_OPS

Definition at line 380 of file item.h.

Field Documentation

◆ rito_decode

int(* rito_decode) (const struct m0_rpc_item_type *item_type, struct m0_rpc_item **item, struct m0_bufvec_cursor *cur)

Create in memory item from serialised representation of item

See also
m0_fop_item_type_default_decode()

Definition at line 411 of file item.h.

◆ rito_deliver

int(* rito_deliver) (struct m0_rpc_machine *rpcmach, struct m0_rpc_item *item)

This method is called on receiver side when RPC layer processed the item of this type and wants to deliver it to the upper layer. If this method is NULL, the default action is to call m0_reqh_fop_handle().

Note
rpcmach can be different from item_machine(item) for connection establishing items.

Definition at line 438 of file item.h.

◆ rito_encode

int(* rito_encode) (const struct m0_rpc_item_type *item_type, struct m0_rpc_item *item, struct m0_bufvec_cursor *cur)

Serialises item at location given by cur.

See also
m0_fop_item_type_default_encode()

Definition at line 404 of file item.h.

◆ rito_eq

bool(* rito_eq) (const struct m0_rpc_item *i1, const struct m0_rpc_item *i2)

Return true iff item1 and item2 are equal.

Todo:
XXX Implement rito_eq for fops

Definition at line 391 of file item.h.

◆ rito_io_coalesce

void(* rito_io_coalesce) (struct m0_rpc_item *head, struct m0_list *list, uint64_t size)

Coalesce rpc items that share same fid and intent(read/write).

Definition at line 397 of file item.h.

◆ rito_item_get

void(* rito_item_get) (struct m0_rpc_item *item)

RPC item type specific routine that will take reference on the item. For fops, this routine is almost always set to m0_fop_item_get().

Definition at line 423 of file item.h.

◆ rito_item_put

void(* rito_item_put) (struct m0_rpc_item *item)

RPC item type specific routine that will drop reference on the item. For fops, this routine is almost always set to m0_fop_item_put().

Definition at line 428 of file item.h.

◆ rito_payload_size

m0_bcount_t(* rito_payload_size) (const struct m0_rpc_item *item)

Returns item payload size.

See also
m0_fop_payload_size()

Definition at line 385 of file item.h.

◆ rito_try_merge

bool(* rito_try_merge) (struct m0_rpc_item *container, struct m0_rpc_item *component, m0_bcount_t limit)

Definition at line 415 of file item.h.


The documentation for this struct was generated from the following file: