Motr  M0
bulkio_common.c File Reference
#include "bulkio_common.h"
#include "rpc/rpclib.h"
#include "ioservice/fid_convert.h"
#include "mdservice/fsync_fops.h"
#include "ut/misc.h"
#include "ut/ut.h"
Include dependency graph for bulkio_common.c:

Go to the source code of this file.

Macros

#define S_DBFILE   "bulkio_st.db"
 
#define S_STOBFILE   "bulkio_st_stob"
 
#define S_ADDB_STOBFILE   "linuxstob:bulkio_st_addb_stob"
 

Functions

 M0_TL_DESCR_DECLARE (rpcbulk, M0_EXTERN)
 
static char ** server_argv_alloc (const char *server_ep_addr, int *argc)
 
int bulkio_server_start (struct bulkio_params *bp, const char *saddr)
 
void bulkio_server_stop (struct m0_rpc_server_ctx *sctx)
 
static void io_fids_init (struct bulkio_params *bp)
 
static void io_buffers_allocate (struct bulkio_params *bp)
 
static void io_buffers_deallocate (struct bulkio_params *bp)
 
static void io_fop_populate (struct bulkio_params *bp, int index, uint64_t off_index, struct m0_io_fop **io_fops, int segs_nr)
 
void io_fops_create (struct bulkio_params *bp, enum M0_RPC_OPCODES op, int fids_nr, int fops_nr, int segs_nr)
 
void io_fops_destroy (struct bulkio_params *bp)
 
int io_fsync_send_fop (struct m0_be_tx_remid *remid, struct thrd_arg *t)
 
void io_fops_rpc_submit (struct thrd_arg *t)
 
void bulkio_params_init (struct bulkio_params *bp)
 
void bulkio_params_fini (struct bulkio_params *bp)
 
int bulkio_client_start (struct bulkio_params *bp, const char *caddr, const char *saddr)
 
void bulkio_client_stop (struct m0_rpc_client_ctx *cctx)
 
void cob_attr_default_fill (struct m0_cob_attr *attr)
 

Variables

struct m0_reqh_service_type m0_ioservice_type
 

Macro Definition Documentation

◆ S_ADDB_STOBFILE

#define S_ADDB_STOBFILE   "linuxstob:bulkio_st_addb_stob"

Definition at line 32 of file bulkio_common.c.

◆ S_DBFILE

#define S_DBFILE   "bulkio_st.db"

Definition at line 30 of file bulkio_common.c.

◆ S_STOBFILE

#define S_STOBFILE   "bulkio_st_stob"

Definition at line 31 of file bulkio_common.c.

Function Documentation

◆ bulkio_client_start()

int bulkio_client_start ( struct bulkio_params bp,
const char *  caddr,
const char *  saddr 
)

Definition at line 468 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulkio_client_stop()

void bulkio_client_stop ( struct m0_rpc_client_ctx cctx)

Definition at line 505 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulkio_params_fini()

void bulkio_params_fini ( struct bulkio_params bp)

Definition at line 437 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulkio_params_init()

void bulkio_params_init ( struct bulkio_params bp)

Definition at line 381 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulkio_server_start()

int bulkio_server_start ( struct bulkio_params bp,
const char *  saddr 
)

Definition at line 82 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulkio_server_stop()

void bulkio_server_stop ( struct m0_rpc_server_ctx sctx)

Definition at line 103 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cob_attr_default_fill()

void cob_attr_default_fill ( struct m0_cob_attr attr)

Definition at line 517 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_buffers_allocate()

static void io_buffers_allocate ( struct bulkio_params bp)
static

Definition at line 130 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_buffers_deallocate()

static void io_buffers_deallocate ( struct bulkio_params bp)
static

Definition at line 146 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_fids_init()

static void io_fids_init ( struct bulkio_params bp)
static

Definition at line 116 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_fop_populate()

static void io_fop_populate ( struct bulkio_params bp,
int  index,
uint64_t  off_index,
struct m0_io_fop **  io_fops,
int  segs_nr 
)
static

Definition at line 157 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_fops_create()

void io_fops_create ( struct bulkio_params bp,
enum M0_RPC_OPCODES  op,
int  fids_nr,
int  fops_nr,
int  segs_nr 
)

Definition at line 218 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_fops_destroy()

void io_fops_destroy ( struct bulkio_params bp)

Definition at line 266 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_fops_rpc_submit()

void io_fops_rpc_submit ( struct thrd_arg t)

Definition at line 336 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_fsync_send_fop()

int io_fsync_send_fop ( struct m0_be_tx_remid remid,
struct thrd_arg t 
)

Sends an fsync fop request to trigger the placing of a specific transaction.

Parameters
remidremote id of the transaction to be fsync'ed.
tstructure containing the bulkio parameters for the operation. From those parameters only the network session is relevant to the function.
Returns
the rc included in the corresponding fsync fop reply.

Definition at line 289 of file bulkio_common.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( rpcbulk  ,
M0_EXTERN   
)
Todo:
This value can be reduced after multiple message delivery in a single buffer is supported.

◆ server_argv_alloc()

static char** server_argv_alloc ( const char *  server_ep_addr,
int *  argc 
)
static

Definition at line 44 of file bulkio_common.c.

Here is the caller graph for this function:

Variable Documentation

◆ m0_ioservice_type

struct m0_reqh_service_type m0_ioservice_type