Motr
M0
|
Data Structures | |
struct | mds_op |
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_IOSERVICE |
Enumerations | |
enum | { RPC_TIMEOUT = 8, MAX_NR_RPC_IN_FLIGHT = 100 } |
Functions | |
M0_TL_DESCR_DEFINE (bufferpools, "rpc machines associated with reqh", M0_INTERNAL, struct m0_rios_buffer_pool, rios_bp_linkage, rios_bp_magic, M0_IOS_BUFFER_POOL_MAGIC, M0_IOS_BUFFER_POOL_HEAD_MAGIC) | |
M0_TL_DEFINE (bufferpools, M0_INTERNAL, struct m0_rios_buffer_pool) | |
static int | ios_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype) |
static void | ios_fini (struct m0_reqh_service *service) |
static int | ios_start (struct m0_reqh_service *service) |
static int | ios_start_async (struct m0_reqh_service_start_async_ctx *asc) |
static bool | ios_start_async_cb (struct m0_clink *clink) |
static void | ios_prepare_to_stop (struct m0_reqh_service *service) |
static void | ios_stop (struct m0_reqh_service *service) |
static void | buffer_pool_not_empty (struct m0_net_buffer_pool *bp) |
static void | buffer_pool_low (struct m0_net_buffer_pool *bp) |
M0_INTERNAL int | m0_ios_register (void) |
M0_INTERNAL void | m0_ios_unregister (void) |
M0_INTERNAL bool | m0_reqh_io_service_invariant (const struct m0_reqh_io_service *rios) |
M0_INTERNAL int | m0_ios_create_buffer_pool (struct m0_reqh_service *service) |
M0_INTERNAL void | m0_ios_delete_buffer_pool (struct m0_reqh_service *service) |
M0_INTERNAL void | m0_ios_cdom_get (struct m0_reqh *reqh, struct m0_cob_domain **out) |
M0_INTERNAL void | m0_ios_cdom_fini (struct m0_reqh *reqh) |
M0_TL_DESCR_DECLARE (cs_eps, extern) | |
M0_TL_DECLARE (cs_eps, M0_INTERNAL, struct cs_endpoint_and_xprt) | |
static int | m0_ios_mds_conn_init (struct m0_reqh *reqh, struct m0_ios_mds_conn_map *conn_map) |
static int | ios_mds_conn_get_locked (struct m0_reqh *reqh, struct m0_ios_mds_conn_map **out, bool *new) |
static int | m0_ios_mds_conn_get (struct m0_reqh *reqh, struct m0_ios_mds_conn_map **out) |
static struct m0_ios_mds_conn * | m0_ios_mds_conn_map_hash (const struct m0_ios_mds_conn_map *imc_map, const struct m0_fid *gfid) |
M0_INTERNAL void | m0_ios_mds_conn_fini (struct m0_reqh *reqh) |
M0_INTERNAL int | m0_ios_mds_getattr (struct m0_reqh *reqh, const struct m0_fid *gfid, struct m0_cob_attr *attr) |
static int | _rpc_post (struct m0_fop *fop, struct m0_rpc_session *session) |
static void | mds_op_release (struct m0_ref *ref) |
static void | getattr_rpc_item_reply_cb (struct m0_rpc_item *item) |
static void | ios_cob_fop_populate (struct m0_fop *fop, const struct m0_fid *cob_fid, const struct m0_fid *gob_fid, uint32_t cob_idx, uint32_t cob_type) |
M0_INTERNAL int | m0_ios_getattr (struct m0_reqh *reqh, const struct m0_fid *gfid, uint64_t index, struct m0_cob_attr *attr) |
static int | _ios_cob_getattr_async (struct m0_rpc_session *rpc_session, struct m0_fid *cob_fid, const struct m0_fid *gfid, struct m0_cob_attr *attr, uint32_t index, uint32_t cob_type, void(*cb)(void *arg, int rc), void *arg) |
M0_INTERNAL int | m0_ios_cob_getattr_async (const struct m0_fid *gfid, struct m0_cob_attr *attr, uint64_t cob_idx, struct m0_pool_version *pv, void(*cb)(void *arg, int rc), void *arg) |
M0_INTERNAL int | m0_ios_getattr_async (struct m0_reqh *reqh, const struct m0_fid *gfid, struct m0_cob_attr *attr, uint64_t index, void(*cb)(void *arg, int rc), void *arg) |
M0_INTERNAL int | m0_ios_mds_getattr_async (struct m0_reqh *reqh, const struct m0_fid *gfid, struct m0_cob_attr *attr, void(*cb)(void *arg, int rc), void *arg) |
M0_INTERNAL void | m0_ios_net_buffer_pool_size_set (uint32_t buffer_pool_size) |
Variables | |
static uint32_t | ios_net_buffer_pool_size = 32 |
static unsigned | ios_mds_conn_key = 0 |
static const struct m0_reqh_service_type_ops | ios_type_ops |
static const struct m0_reqh_service_ops | ios_ops |
struct m0_net_buffer_pool_ops | buffer_pool_ops |
struct m0_reqh_service_type | m0_ios_type |
enum { ... } | M0_XCA_DOMAIN |
static const struct m0_rpc_item_ops | getattr_fop_rpc_item_ops |
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_IOSERVICE |
Definition at line 27 of file io_service.c.
anonymous enum |
Enumerator | |
---|---|
RPC_TIMEOUT | |
MAX_NR_RPC_IN_FLIGHT |
Definition at line 486 of file io_service.c.
|
static |
Definition at line 852 of file io_service.c.
|
static |
Definition at line 710 of file io_service.c.
|
static |
Buffer pool operation function. This function gets called when network buffer availability hits lower threshold.
bp | buffer pool pointer. |
Definition at line 145 of file io_service.c.
|
static |
Buffer pool operation function. This function gets called when buffer pool becomes non empty. It sends signal to FOM waiting for network buffer.
bp | buffer pool pointer. |
Definition at line 127 of file io_service.c.
|
static |
|
static |
Allocates and initiates I/O Service instance. This operation allocates & initiates service instance with its operation vector.
stype | service type |
service | pointer to service instance. |
Definition at line 326 of file io_service.c.
|
static |
Definition at line 789 of file io_service.c.
|
static |
Finalise I/O Service instance. This operation finalises service instance and de-allocate it.
service | pointer to service instance. |
Definition at line 354 of file io_service.c.
|
static |
Definition at line 548 of file io_service.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 421 of file io_service.c.
|
static |
M0_INTERNAL void m0_ios_cdom_fini | ( | struct m0_reqh * | reqh | ) |
Definition at line 474 of file io_service.c.
M0_INTERNAL void m0_ios_cdom_get | ( | struct m0_reqh * | reqh, |
struct m0_cob_domain ** | out | ||
) |
Definition at line 463 of file io_service.c.
M0_INTERNAL int m0_ios_cob_getattr_async | ( | const struct m0_fid * | gfid, |
struct m0_cob_attr * | attr, | ||
uint64_t | cob_idx, | ||
struct m0_pool_version * | pv, | ||
void(*)(void *arg, int rc) | cb, | ||
void * | arg | ||
) |
Definition at line 891 of file io_service.c.
M0_INTERNAL int m0_ios_create_buffer_pool | ( | struct m0_reqh_service * | service | ) |
Create & initialise instance of buffer pool per domain.
service | pointer to service instance. |
Definition at line 202 of file io_service.c.
M0_INTERNAL void m0_ios_delete_buffer_pool | ( | struct m0_reqh_service * | service | ) |
Delete instances of buffer pool. It go through buffer pool list and delete the instance.
service | pointer to service instance. |
Definition at line 292 of file io_service.c.
M0_INTERNAL int m0_ios_getattr | ( | struct m0_reqh * | reqh, |
const struct m0_fid * | gfid, | ||
uint64_t | index, | ||
struct m0_cob_attr * | attr | ||
) |
Getattr of file from ioservice synchronously.
Definition at line 814 of file io_service.c.
M0_INTERNAL int m0_ios_getattr_async | ( | struct m0_reqh * | reqh, |
const struct m0_fid * | gfid, | ||
struct m0_cob_attr * | attr, | ||
uint64_t | index, | ||
void(*)(void *arg, int rc) | cb, | ||
void * | arg | ||
) |
getattr from ioservice asynchronously.
Definition at line 916 of file io_service.c.
M0_INTERNAL void m0_ios_mds_conn_fini | ( | struct m0_reqh * | reqh | ) |
Terminates and clears the ioservice to mdservice connection.
Definition at line 617 of file io_service.c.
|
static |
Gets ioservice to mdservice connection. If it is newly allocated, establish the connection.
out | the connection is returned here. |
Definition at line 579 of file io_service.c.
|
static |
Definition at line 494 of file io_service.c.
|
static |
Definition at line 600 of file io_service.c.
M0_INTERNAL int m0_ios_mds_getattr | ( | struct m0_reqh * | reqh, |
const struct m0_fid * | gfid, | ||
struct m0_cob_attr * | attr | ||
) |
Gets file attributes from mdservice.
reqh | the request handler. |
gfid | the global fid of the file. |
attr | the returned attributes will be stored here. |
Definition at line 663 of file io_service.c.
M0_INTERNAL int m0_ios_mds_getattr_async | ( | struct m0_reqh * | reqh, |
const struct m0_fid * | gfid, | ||
struct m0_cob_attr * | attr, | ||
void(*)(void *arg, int rc) | cb, | ||
void * | arg | ||
) |
getattr from mdservice asynchronously.
Definition at line 940 of file io_service.c.
M0_INTERNAL void m0_ios_net_buffer_pool_size_set | ( | uint32_t | buffer_pool_size | ) |
Sets default values for buf_nr for m0_net_buffer_pool_provision() in ioservice.
Definition at line 994 of file io_service.c.
M0_INTERNAL int m0_ios_register | ( | void | ) |
Registers I/O service with motr node. Motr setup calls this function.
Definition at line 158 of file io_service.c.
M0_INTERNAL void m0_ios_unregister | ( | void | ) |
Unregisters I/O service from motr node.
Definition at line 174 of file io_service.c.
M0_INTERNAL bool m0_reqh_io_service_invariant | ( | const struct m0_reqh_io_service * | rios | ) |
M0_TL_DECLARE | ( | cs_eps | , |
M0_INTERNAL | , | ||
struct cs_endpoint_and_xprt | |||
) |
M0_TL_DEFINE | ( | bufferpools | , |
M0_INTERNAL | , | ||
struct m0_rios_buffer_pool | |||
) |
M0_TL_DESCR_DECLARE | ( | cs_eps | , |
extern | |||
) |
M0_TL_DESCR_DEFINE | ( | bufferpools | , |
"rpc machines associated with reqh" | , | ||
M0_INTERNAL | , | ||
struct m0_rios_buffer_pool | , | ||
rios_bp_linkage | , | ||
rios_bp_magic | , | ||
M0_IOS_BUFFER_POOL_MAGIC | , | ||
M0_IOS_BUFFER_POOL_HEAD_MAGIC | |||
) |
|
static |
Definition at line 739 of file io_service.c.
struct m0_net_buffer_pool_ops buffer_pool_ops |
Buffer pool operations.
Definition at line 107 of file io_service.c.
|
static |
Definition at line 785 of file io_service.c.
|
static |
Key for ios mds connection.
Definition at line 71 of file io_service.c.
|
static |
These values are supposed to be fetched from configuration cache. Since configuration cache module is not available, these values are defined as a static variable.
Definition at line 66 of file io_service.c.
|
static |
I/O Service operations.
Definition at line 96 of file io_service.c.
|
static |
I/O Service type operations.
Definition at line 89 of file io_service.c.
struct m0_reqh_service_type m0_ios_type |
Definition at line 112 of file io_service.c.
enum { ... } M0_XCA_DOMAIN |