Motr  M0
rm_service.c File Reference
#include "rm/rm_service.h"
#include "rm/ut/rmut.h"
#include "rpc/rpclib.h"
#include "ut/misc.h"
#include "ut/ut.h"
Include dependency graph for rm_service.c:

Go to the source code of this file.

Macros

#define SERVER_ENDPOINT_ADDR   "0@lo:12345:34:1"
 
#define SERVER_ENDPOINT   M0_NET_XPRT_PREFIX_DEFAULT":"SERVER_ENDPOINT_ADDR
 
#define SERVER_DB   "server_db"
 
#define SERVER_STOB   "server_stob"
 
#define SERVER_ADDB_STOB   "linuxstob:server_addb_stob"
 
#define SERVER_LOG   "rmserver.log"
 

Functions

void flock_client_utdata_ops_set (struct rm_ut_data *data)
 
static void rm_service_start (struct m0_rpc_server_ctx *sctx)
 
static void rm_service_stop (struct m0_rpc_server_ctx *sctx)
 
static void rm_svc_server (const int tid)
 
static void test_flock (struct m0_rm_owner *owner, struct m0_file *file, struct m0_fid *fid, struct m0_rm_remote *creditor, bool unwind)
 
static void rm_client (const int tid)
 
void rmsvc (void)
 

Variables

static char * server_argv []
 
struct m0_reqh_service_type m0_rms_type
 
static struct rm_ctxserver_ctx = &rm_ctxs[SERVER_1]
 
static struct rm_ctxclient_ctx = &rm_ctxs[SERVER_2]
 
static struct m0_clink tests_clink [TEST_NR]
 
static struct m0_rpc_server_ctx sctx
 

Macro Definition Documentation

◆ SERVER_ADDB_STOB

#define SERVER_ADDB_STOB   "linuxstob:server_addb_stob"

Definition at line 33 of file rm_service.c.

◆ SERVER_DB

#define SERVER_DB   "server_db"

Definition at line 31 of file rm_service.c.

◆ SERVER_ENDPOINT

#define SERVER_ENDPOINT   M0_NET_XPRT_PREFIX_DEFAULT":"SERVER_ENDPOINT_ADDR

Definition at line 30 of file rm_service.c.

◆ SERVER_ENDPOINT_ADDR

#define SERVER_ENDPOINT_ADDR   "0@lo:12345:34:1"

Definition at line 29 of file rm_service.c.

◆ SERVER_LOG

#define SERVER_LOG   "rmserver.log"

Definition at line 34 of file rm_service.c.

◆ SERVER_STOB

#define SERVER_STOB   "server_stob"

Definition at line 32 of file rm_service.c.

Function Documentation

◆ flock_client_utdata_ops_set()

void flock_client_utdata_ops_set ( struct rm_ut_data data)

Definition at line 157 of file file.c.

Here is the caller graph for this function:

◆ rm_client()

static void rm_client ( const int  tid)
static

Definition at line 120 of file rm_service.c.

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

◆ rm_service_start()

static void rm_service_start ( struct m0_rpc_server_ctx sctx)
static

Definition at line 58 of file rm_service.c.

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

◆ rm_service_stop()

static void rm_service_stop ( struct m0_rpc_server_ctx sctx)
static

Definition at line 66 of file rm_service.c.

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

◆ rm_svc_server()

static void rm_svc_server ( const int  tid)
static

Definition at line 71 of file rm_service.c.

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

◆ rmsvc()

void rmsvc ( void  )

Definition at line 229 of file rm_service.c.

Here is the call graph for this function:

◆ test_flock()

static void test_flock ( struct m0_rm_owner owner,
struct m0_file file,
struct m0_fid fid,
struct m0_rm_remote creditor,
bool  unwind 
)
static

Definition at line 89 of file rm_service.c.

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

Variable Documentation

◆ client_ctx

struct rm_ctx* client_ctx = &rm_ctxs[SERVER_2]
static

Definition at line 47 of file rm_service.c.

◆ sctx

struct m0_rpc_server_ctx sctx
static
Initial value:
= {
.rsx_xprts_nr = 1,
.rsx_argv = server_argv,
.rsx_argc = ARRAY_SIZE(server_argv),
.rsx_log_file_name = SERVER_LOG,
}
#define SERVER_LOG
Definition: rm_service.c:34
static char * server_argv[]
Definition: rm_service.c:36
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 51 of file rm_service.c.

◆ server_argv

char* server_argv[]
static
Initial value:
= {
"rm-ut", "-T", "linux", "-D", SERVER_DB,
"-w", "10", "-e", SERVER_ENDPOINT, "-H", SERVER_ENDPOINT_ADDR,
"-c", M0_UT_PATH("conf.xc")
}
#define SERVER_DB
Definition: rm_service.c:31
#define SERVER_STOB
Definition: rm_service.c:32
#define SERVER_ENDPOINT_ADDR
Definition: rm_service.c:29
#define SERVER_ADDB_STOB
Definition: rm_service.c:33
#define M0_UT_CONF_PROCESS
Definition: misc.h:45
#define SERVER_ENDPOINT
Definition: rm_service.c:30
#define M0_UT_PATH(name)
Definition: misc.h:41

Definition at line 36 of file rm_service.c.

◆ server_ctx

struct rm_ctx* server_ctx = &rm_ctxs[SERVER_1]
static

Definition at line 46 of file rm_service.c.

◆ tests_clink

struct m0_clink tests_clink[TEST_NR]
static

Definition at line 48 of file rm_service.c.