Motr  M0
pool_trigger.c File Reference
#include "lib/trace.h"
#include "lib/assert.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "fop/fop.h"
#include "net/lnet/lnet.h"
#include "rpc/rpc.h"
#include "rpc/rpclib.h"
#include "lib/getopts.h"
#include "motr/init.h"
#include "pool/pool.h"
#include "pool/pool_fops.h"
#include "module/instance.h"
Include dependency graph for pool_trigger.c:

Go to the source code of this file.

Data Structures

struct  rpc_ctx
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_POOL
 

Enumerations

enum  { MAX_RPCS_IN_FLIGHT = 10, MAX_DEV_NR = 100, MAX_SERVERS = 1024 }
 

Functions

static int poolmach_client_init (void)
 
static void poolmach_client_fini (void)
 
static int poolmach_rpc_ctx_init (struct rpc_ctx *ctx, const char *sep)
 
static void poolmach_rpc_ctx_fini (struct rpc_ctx *ctx)
 
static void print_help (void)
 
int main (int argc, char *argv[])
 

Variables

static struct m0_net_domain cl_ndom
 
static struct m0_rpc_client_ctx cl_ctx
 
static struct m0_fid cl_process_fid = M0_FID_TINIT('r', 0, 1)
 
static const char * cl_ep_addr
 
static const char * srv_ep_addr [MAX_SERVERS]
 
static struct m0_fid device_fid_arr [MAX_DEV_NR]
 
static int64_t device_state_arr [MAX_DEV_NR]
 
static int di = 0
 
static int ds = 0
 
static uint32_t dev_nr = 0
 
static struct m0_mutex poolmach_wait_mutex
 
static struct m0_chan poolmach_wait
 
static int32_t srv_cnt = 0
 
struct m0_fop_type trigger_fop_fopt
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_POOL

Definition at line 23 of file pool_trigger.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_RPCS_IN_FLIGHT 
MAX_DEV_NR 
MAX_SERVERS 

Definition at line 43 of file pool_trigger.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 137 of file pool_trigger.c.

Here is the call graph for this function:

◆ poolmach_client_fini()

static void poolmach_client_fini ( void  )
static

Definition at line 83 of file pool_trigger.c.

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

◆ poolmach_client_init()

static int poolmach_client_init ( void  )
static

Definition at line 63 of file pool_trigger.c.

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

◆ poolmach_rpc_ctx_fini()

static void poolmach_rpc_ctx_fini ( struct rpc_ctx ctx)
static

Definition at line 104 of file pool_trigger.c.

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

◆ poolmach_rpc_ctx_init()

static int poolmach_rpc_ctx_init ( struct rpc_ctx ctx,
const char *  sep 
)
static

Definition at line 94 of file pool_trigger.c.

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

◆ print_help()

static void print_help ( void  )
static

Definition at line 124 of file pool_trigger.c.

Here is the caller graph for this function:

Variable Documentation

◆ cl_ctx

struct m0_rpc_client_ctx cl_ctx
static

Definition at line 40 of file pool_trigger.c.

◆ cl_ep_addr

const char* cl_ep_addr
static

Definition at line 49 of file pool_trigger.c.

◆ cl_ndom

struct m0_net_domain cl_ndom
static

Definition at line 39 of file pool_trigger.c.

◆ cl_process_fid

struct m0_fid cl_process_fid = M0_FID_TINIT('r', 0, 1)
static

Definition at line 41 of file pool_trigger.c.

◆ dev_nr

uint32_t dev_nr = 0
static

Definition at line 55 of file pool_trigger.c.

◆ device_fid_arr

struct m0_fid device_fid_arr[MAX_DEV_NR]
static

Definition at line 51 of file pool_trigger.c.

◆ device_state_arr

int64_t device_state_arr[MAX_DEV_NR]
static

Definition at line 52 of file pool_trigger.c.

◆ di

int di = 0
static

Definition at line 53 of file pool_trigger.c.

◆ ds

int ds = 0
static

Definition at line 54 of file pool_trigger.c.

◆ poolmach_wait

struct m0_chan poolmach_wait
static

Definition at line 119 of file pool_trigger.c.

◆ poolmach_wait_mutex

struct m0_mutex poolmach_wait_mutex
static

Definition at line 118 of file pool_trigger.c.

◆ srv_cnt

int32_t srv_cnt = 0
static

Definition at line 120 of file pool_trigger.c.

◆ srv_ep_addr

const char* srv_ep_addr[MAX_SERVERS]
static

Definition at line 50 of file pool_trigger.c.

◆ trigger_fop_fopt

struct m0_fop_type trigger_fop_fopt