30 #define S_DBFILE "bulkio_st.db" 31 #define S_STOBFILE "bulkio_st_stob" 32 #define S_ADDB_STOBFILE "linuxstob:bulkio_st_addb_stob" 51 char rpc_size[STRLEN];
52 const char *argv[] = {
53 "bulkio_st",
"-T",
"AD",
"-D",
S_DBFILE,
55 "-q", tm_len,
"-m", rpc_size,
"-w",
"10",
"-G",
ep,
67 n = snprintf(rpc_size,
sizeof rpc_size,
"%d",
158 uint64_t off_index,
struct m0_io_fop **io_fops,
171 iofop = io_fops[
index];
188 for (
i = 0;
i < segs_nr; ++
i) {
219 int fids_nr,
int fops_nr,
int segs_nr)
229 for (
i = 0;
i < fids_nr; ++
i)
247 for (
i = 0;
i < fops_nr; ++
i) {
255 for (
i = 0;
i < fops_nr; ++
i) {
256 if (fids_nr < fops_nr) {
351 M0_SET0(&io_fops[
i]->if_fop.f_item.ri_sm);
519 attr->ca_atime =
attr->ca_mtime =
attr->ca_ctime = 1416970585;
522 attr->ca_mode = 0100644;
524 attr->ca_size =
attr->ca_blocks = 0;
M0_INTERNAL int m0_rpc_post(struct m0_rpc_item *item)
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
void m0_net_domain_fini(struct m0_net_domain *dom)
M0_INTERNAL void m0_fid_gob_make(struct m0_fid *gob_fid, uint32_t container, uint64_t key)
enum m0_rpc_item_priority ri_prio
struct m0_thread ** bp_threads
struct m0_net_xprt * bp_xprt
M0_INTERNAL int m0_rpc_bulk_store(struct m0_rpc_bulk *rbulk, const struct m0_rpc_conn *conn, struct m0_net_buf_desc_data *to_desc, const struct m0_net_buffer_callbacks *bulk_cb)
struct m0_bufvec nb_buffer
const m0_time_t M0_TIME_NEVER
M0_INTERNAL int m0_rpc_bulk_buf_databuf_add(struct m0_rpc_bulk_buf *rbuf, void *buf, m0_bcount_t count, m0_bindex_t index, struct m0_net_domain *netdom)
int m0_rpc_server_start(struct m0_rpc_server_ctx *sctx)
struct m0_rpc_server_ctx * bp_sctx
struct m0_rpc_bulk if_rbulk
struct m0_fop_type m0_fop_fsync_ios_fopt
struct m0_fid bp_fids[IO_FIDS_NR]
struct m0_net_buf_desc_data * id_descs
static struct m0_rpc_client_ctx cctx
void * m0_fop_data(const struct m0_fop *fop)
struct m0_rm_resource_type bp_flock_rt
M0_INTERNAL void m0_rm_domain_init(struct m0_rm_domain *dom)
int bulkio_server_start(struct bulkio_params *bp, const char *saddr)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
static void io_fids_init(struct bulkio_params *bp)
static struct m0_rpc_item * item
int m0_rpc_item_wait_for_reply(struct m0_rpc_item *item, m0_time_t timeout)
struct m0_be_tx_remid bp_remid
int bulkio_client_start(struct bulkio_params *bp, const char *caddr, const char *saddr)
int m0_bufvec_alloc_aligned(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size, unsigned shift)
M0_INTERNAL void m0_file_lock_type_deregister(struct m0_rm_resource_type *flock_rt)
uint64_t bp_offsets[IO_FIDS_NR]
void io_fops_destroy(struct bulkio_params *bp)
M0_INTERNAL int m0_file_lock_type_register(struct m0_rm_domain *dom, struct m0_rm_resource_type *flock_rt)
M0_INTERNAL struct m0_rpc_bulk * m0_fop_to_rpcbulk(const struct m0_fop *fop)
M0_INTERNAL struct m0_fop_cob_rw_reply * io_rw_rep_get(struct m0_fop *fop)
M0_INTERNAL uint64_t m0_rnd(uint64_t max, uint64_t *seed)
static void attr(struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
#define M0_NET_XPRT_PREFIX_DEFAULT
static void io_buffers_deallocate(struct bulkio_params *bp)
struct m0_rpc_client_ctx * bp_cctx
struct m0_io_descs crw_desc
uint32_t rcx_max_rpc_msg_size
struct m0_rm_domain bp_rdom
static void io_fop_populate(struct bulkio_params *bp, int index, uint64_t off_index, struct m0_io_fop **io_fops, int segs_nr)
struct m0_be_tx_remid ffr_be_remid
static struct m0_thread t[8]
void io_fops_rpc_submit(struct thrd_arg *t)
struct m0_rpc_conn rcx_connection
int m0_rpc_client_stop(struct m0_rpc_client_ctx *cctx)
struct m0_net_xprt * m0_net_xprt_default_get(void)
void bulkio_params_init(struct bulkio_params *bp)
int m0_rpc_client_start(struct m0_rpc_client_ctx *cctx)
struct m0_rpc_item * ri_reply
struct m0_fop_mod_rep rwr_mod_rep
static struct m0_rpc_server_ctx sctx
M0_INTERNAL uint32_t m0_fid_cob_device_id(const struct m0_fid *cob_fid)
M0_INTERNAL size_t m0_tlist_length(const struct m0_tl_descr *d, const struct m0_tl *list)
uint32_t rcx_recv_queue_min_length
M0_INTERNAL struct m0_rpc_machine * session_machine(const struct m0_rpc_session *s)
static char ** server_argv_alloc(const char *server_ep_addr, int *argc)
void bulkio_client_stop(struct m0_rpc_client_ctx *cctx)
struct m0_rpc_machine machine
struct m0_net_domain * rcx_net_dom
M0_TL_DESCR_DECLARE(rpcbulk, M0_EXTERN)
M0_INTERNAL void m0_bufvec_free_aligned(struct m0_bufvec *bufvec, unsigned shift)
void cob_attr_default_fill(struct m0_cob_attr *attr)
uint64_t rcx_max_rpcs_in_flight
struct m0_fop_type m0_fop_cob_readv_fopt
struct m0_net_buffer ** bp_iobuf
static uint32_t min32u(uint32_t a, uint32_t b)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
static const struct m0_fid CONF_PVER_FID
struct m0_rpc_session rcx_session
struct m0_io_fop ** bp_rfops
#define IO_SERVER_LOGFILE
static void io_buffers_allocate(struct bulkio_params *bp)
struct m0_be_tx_remid ff_be_remid
#define M0_ALLOC_PTR(ptr)
#define M0_UT_CONF_PROCESS
struct m0_rpc_session * ri_session
const char * rcx_remote_addr
struct m0_reqh_service_type m0_ioservice_type
void bulkio_params_fini(struct bulkio_params *bp)
void bulkio_server_stop(struct m0_rpc_server_ctx *sctx)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
struct m0_net_domain bp_cnetdom
M0_INTERNAL int32_t m0_net_domain_get_max_buffer_segments(struct m0_net_domain *dom)
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
const char * rcx_local_addr
int io_fsync_send_fop(struct m0_be_tx_remid *remid, struct thrd_arg *t)
void io_fops_create(struct bulkio_params *bp, enum M0_RPC_OPCODES op, int fids_nr, int fops_nr, int segs_nr)
void m0_rpc_server_stop(struct m0_rpc_server_ctx *sctx)
M0_INTERNAL int m0_io_fop_init(struct m0_io_fop *iofop, const struct m0_fid *gfid, struct m0_fop_type *ftype, void(*fop_release)(struct m0_ref *))
static struct bulkio_params * bp
M0_INTERNAL void m0_fid_convert_gob2cob(const struct m0_fid *gob_fid, struct m0_fid *cob_fid, uint32_t device_id)
M0_INTERNAL bool m0_is_read_fop(const struct m0_fop *fop)
const struct m0_net_buffer_callbacks m0_rpc__buf_bulk_cb
M0_INTERNAL struct m0_fop_cob_rw * io_rw_get(struct m0_fop *fop)
M0_INTERNAL int m0_io_fop_prepare(struct m0_fop *fop)
M0_INTERNAL int m0_rpc_bulk_buf_add(struct m0_rpc_bulk *rbulk, uint32_t segs_nr, m0_bcount_t length, struct m0_net_domain *netdom, struct m0_net_buffer *nb, struct m0_rpc_bulk_buf **out)
struct m0_fop_type m0_fop_cob_writev_fopt
struct m0_rpc_item f_item
struct m0_io_fop ** bp_wfops
M0_INTERNAL void m0_rm_domain_fini(struct m0_rm_domain *dom)
struct m0_fid g_process_fid
struct m0_be_tx_remid fmr_remid
struct m0_fop * m0_fop_alloc(struct m0_fop_type *fopt, void *data, struct m0_rpc_machine *mach)