Motr  M0
io_service.c File Reference
#include "lib/trace.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/tlist.h"
#include "lib/locality.h"
#include "lib/misc.h"
#include "motr/magic.h"
#include "rpc/rpc.h"
#include "rpc/rpclib.h"
#include "net/buffer_pool.h"
#include "reqh/reqh_service.h"
#include "reqh/reqh.h"
#include "ioservice/io_fops.h"
#include "ioservice/io_service.h"
#include "ioservice/ios_start_sm.h"
#include "pool/pool.h"
#include "net/lnet/lnet.h"
#include "mdservice/md_fops.h"
#include "layout/layout.h"
#include "layout/pdclust.h"
#include "mdservice/fsync_fops.h"
#include "module/instance.h"
#include "ioservice/fid_convert.h"
Include dependency graph for io_service.c:

Go to the source code of this file.

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_connm0_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