Motr  M0
mt_fom.c File Reference
#include "lib/trace.h"
#include "motr/client.h"
#include "motr/st/st.h"
#include "motr/st/st_misc.h"
#include "motr/st/st_assert.h"
#include "fid/fid.h"
#include "fop/fom_simple.h"
#include "lib/misc.h"
Include dependency graph for mt_fom.c:

Go to the source code of this file.

Data Structures

struct  st_fom_ctx
 
struct  st_mt_ctxt
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Enumerations

enum  {
  CMT_PUTS = 64, CMT_GETS = CMT_PUTS, CMT_DELS = CMT_PUTS, CMT_IDXS = 64,
  CMT_IDXD = CMT_IDXS, CMT_BATCH = 16, CMT_BATCH_OFF = 1024, CMT_FOM_PER_LOC = 2,
  CMT_IDXS_NR = CMT_IDXS, CMT_KV_SZ = 10
}
 
enum  {
  REQ_CREATE, REQ_DELETE, REQ_LOOKUP, REQ_NEXT,
  REQ_GET, REQ_PUT, REQ_DEL
}
 

Functions

static int st_mt_init (void)
 
static int st_mt_fini (void)
 
 M0_BASSERT (CMT_PUTS >=CMT_IDXS)
 
static void fom_simple_svc_start (struct m0_reqh *reqh)
 
static void st_op_lock (struct m0_op *op)
 
static void st_op_unlock (struct m0_op *op)
 
static int st_op_tick_ret (struct m0_op *op, struct m0_fom *fom)
 
static void st_dix_kv_destroy (struct m0_bufvec *keys, struct m0_bufvec *vals)
 
static void st_kv_alloc_and_fill (struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t first, uint32_t last, bool emptyvals)
 
static void st_vals_check (struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t first, uint32_t last)
 
static void st_ifid_fill (struct m0_fid *ifid, int i)
 
static int st_common_tick (struct m0_fom *fom, void *data, int *phase, int rqtype)
 
static int st_get_tick (struct m0_fom *fom, void *data, int *phase)
 
static int st_put_tick (struct m0_fom *fom, void *data, int *phase)
 
static int st_del_tick (struct m0_fom *fom, void *data, int *phase)
 
static int st_idx_create_tick (struct m0_fom *fom, void *data, int *phase)
 
static int st_idx_delete_tick (struct m0_fom *fom, void *data, int *phase)
 
static void st_fom_free (struct m0_fom_simple *fom_s)
 
static void st_foms_run (struct st_mt_ctxt *ctx, int(*tick)(struct m0_fom *, void *, int *))
 
static void st_foms_init (struct st_mt_ctxt *ctx)
 
void st_mt_inst (struct m0_client *cli)
 
void st_lsfid_inst (struct m0_client *cli, void(*print)(struct m0_fid *))
 
void st_lsfid_inst_cancel (struct m0_client *cli, void(*print)(struct m0_fid *))
 
void st_mt (void)
 
void st_lsfid (void)
 
void st_lsfid_cancel (void)
 

Variables

struct st_suite st_suite_mt
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 23 of file mt_fom.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CMT_PUTS 
CMT_GETS 
CMT_DELS 
CMT_IDXS 
CMT_IDXD 
CMT_BATCH 
CMT_BATCH_OFF 
CMT_FOM_PER_LOC 
CMT_IDXS_NR 
CMT_KV_SZ 

Definition at line 46 of file mt_fom.c.

◆ anonymous enum

anonymous enum
Enumerator
REQ_CREATE 
REQ_DELETE 
REQ_LOOKUP 
REQ_NEXT 
REQ_GET 
REQ_PUT 
REQ_DEL 

Definition at line 65 of file mt_fom.c.

Function Documentation

◆ fom_simple_svc_start()

static void fom_simple_svc_start ( struct m0_reqh reqh)
static

Definition at line 104 of file mt_fom.c.

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

◆ M0_BASSERT()

M0_BASSERT ( CMT_PUTS >=  CMT_IDXS)

◆ st_common_tick()

static int st_common_tick ( struct m0_fom fom,
void *  data,
int *  phase,
int  rqtype 
)
static

Definition at line 206 of file mt_fom.c.

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

◆ st_del_tick()

static int st_del_tick ( struct m0_fom fom,
void *  data,
int *  phase 
)
static

Definition at line 305 of file mt_fom.c.

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

◆ st_dix_kv_destroy()

static void st_dix_kv_destroy ( struct m0_bufvec keys,
struct m0_bufvec vals 
)
static

Definition at line 148 of file mt_fom.c.

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

◆ st_fom_free()

static void st_fom_free ( struct m0_fom_simple fom_s)
static

Definition at line 320 of file mt_fom.c.

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

◆ st_foms_init()

static void st_foms_init ( struct st_mt_ctxt ctx)
static

Definition at line 350 of file mt_fom.c.

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

◆ st_foms_run()

static void st_foms_run ( struct st_mt_ctxt ctx,
int(*)(struct m0_fom *, void *, int *)  tick 
)
static

Definition at line 328 of file mt_fom.c.

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

◆ st_get_tick()

static int st_get_tick ( struct m0_fom fom,
void *  data,
int *  phase 
)
static

Definition at line 295 of file mt_fom.c.

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

◆ st_idx_create_tick()

static int st_idx_create_tick ( struct m0_fom fom,
void *  data,
int *  phase 
)
static

Definition at line 310 of file mt_fom.c.

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

◆ st_idx_delete_tick()

static int st_idx_delete_tick ( struct m0_fom fom,
void *  data,
int *  phase 
)
static

Definition at line 315 of file mt_fom.c.

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

◆ st_ifid_fill()

static void st_ifid_fill ( struct m0_fid ifid,
int  i 
)
static

Definition at line 201 of file mt_fom.c.

Here is the caller graph for this function:

◆ st_kv_alloc_and_fill()

static void st_kv_alloc_and_fill ( struct m0_bufvec keys,
struct m0_bufvec vals,
uint32_t  first,
uint32_t  last,
bool  emptyvals 
)
static

Definition at line 155 of file mt_fom.c.

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

◆ st_lsfid()

void st_lsfid ( void  )

Definition at line 516 of file mt_fom.c.

Here is the call graph for this function:

◆ st_lsfid_cancel()

void st_lsfid_cancel ( void  )

Definition at line 521 of file mt_fom.c.

Here is the call graph for this function:

◆ st_lsfid_inst()

void st_lsfid_inst ( struct m0_client cli,
void(*)(struct m0_fid *)  print 
)

Definition at line 406 of file mt_fom.c.

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

◆ st_lsfid_inst_cancel()

void st_lsfid_inst_cancel ( struct m0_client cli,
void(*)(struct m0_fid *)  print 
)

Definition at line 454 of file mt_fom.c.

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

◆ st_mt()

void st_mt ( void  )

Definition at line 511 of file mt_fom.c.

Here is the call graph for this function:

◆ st_mt_fini()

static int st_mt_fini ( void  )
static

Definition at line 41 of file mt_fom.c.

◆ st_mt_init()

static int st_mt_init ( void  )
static

Definition at line 36 of file mt_fom.c.

◆ st_mt_inst()

void st_mt_inst ( struct m0_client cli)

Definition at line 377 of file mt_fom.c.

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

◆ st_op_lock()

static void st_op_lock ( struct m0_op op)
static

Definition at line 121 of file mt_fom.c.

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

◆ st_op_tick_ret()

static int st_op_tick_ret ( struct m0_op op,
struct m0_fom fom 
)
static

Definition at line 131 of file mt_fom.c.

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

◆ st_op_unlock()

static void st_op_unlock ( struct m0_op op)
static

Definition at line 126 of file mt_fom.c.

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

◆ st_put_tick()

static int st_put_tick ( struct m0_fom fom,
void *  data,
int *  phase 
)
static

Definition at line 300 of file mt_fom.c.

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

◆ st_vals_check()

static void st_vals_check ( struct m0_bufvec keys,
struct m0_bufvec vals,
uint32_t  first,
uint32_t  last 
)
static

Definition at line 179 of file mt_fom.c.

Here is the caller graph for this function:

Variable Documentation

◆ st_suite_mt

struct st_suite st_suite_mt
Initial value:
= {
.ss_name = "st_mt",
.ss_init = st_mt_init,
.ss_fini = st_mt_fini,
.ss_tests = {
{ "st_mt", st_mt },
{ "st_lsfid", st_lsfid },
{ "st_lsfid_cancel", st_lsfid_cancel },
{ NULL, NULL },
}
}
static int st_mt_init(void)
Definition: mt_fom.c:36
void st_lsfid_cancel(void)
Definition: mt_fom.c:521
#define NULL
Definition: misc.h:38
void st_mt(void)
Definition: mt_fom.c:511
static int st_mt_fini(void)
Definition: mt_fom.c:41
void st_lsfid(void)
Definition: mt_fom.c:516

Definition at line 526 of file mt_fom.c.