Motr  M0
file.c File Reference
#include "lib/types.h"
#include "lib/chan.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "lib/time.h"
#include "lib/vec.h"
#include "fop/fom_generic.h"
#include "fid/fid.h"
#include "ut/ut.h"
#include "rm/rm.h"
#include "rm/rm_internal.h"
#include "rm/rm_fops.h"
#include "file/file.h"
#include "rm/ut/rmut.h"
Include dependency graph for file.c:

Go to the source code of this file.

Enumerations

enum  { CLNT_THR_NR = 10, SRV_THR_NR = 10 }
 

Functions

static void fl_rtype_set (struct rm_ut_data *self)
 
static void fl_rtype_unset (struct rm_ut_data *self)
 
static void fl_res_set (struct rm_ut_data *self)
 
static void fl_res_unset (struct rm_ut_data *self)
 
static void fl_owner_set (struct rm_ut_data *self)
 
static void fl_owner_unset (struct rm_ut_data *self)
 
static void fl_datum_set (struct rm_ut_data *self)
 
void flock_client_utdata_ops_set (struct rm_ut_data *data)
 
void flock_srv_utdata_ops_set (struct rm_ut_data *data)
 
static void file_encdec_test (struct rm_ut_data *utdata)
 
static void wait_lock (enum rm_server srv_id)
 
void test_verify (enum flock_tests test_id)
 
static void dlock (enum rm_server srv_id, int n)
 
static void srv_dlock (int n)
 
static void srv_dlock_run (void)
 
static void clnt_dlock (int n)
 
static void client_dlock_run (void)
 
static void server_lock_test (void)
 
static void testcase2_run (void)
 
static void testcase1_run (void)
 
static void client_lock_test (void)
 
static void client_tests (void)
 
static void server_tests (void)
 
static void rm_server_start (const int tid)
 
static void server_hier_config (void)
 
static void flock_utinit (void)
 
static void flock_utfini (void)
 
void flock_test (void)
 

Variables

const struct m0_rm_resource_type_ops file_lock_type_ops
 
static struct m0_thread clnt_thr [CLNT_THR_NR]
 
static struct m0_thread srv_thr [SRV_THR_NR]
 
static int clnt_counter
 
static int srv_counter
 
static enum rm_server test_servers_nr
 
static struct m0_clink tests_clink [LOCK_TESTS_NR]
 
static const struct rm_ut_data_ops fl_srv_ut_data_ops
 
static const struct rm_ut_data_ops fl_client_ut_data_ops
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CLNT_THR_NR 
SRV_THR_NR 

Definition at line 47 of file file.c.

Function Documentation

◆ client_dlock_run()

static void client_dlock_run ( void  )
static

Definition at line 308 of file file.c.

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

◆ client_lock_test()

static void client_lock_test ( void  )
static

Definition at line 380 of file file.c.

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

◆ client_tests()

static void client_tests ( void  )
static

Definition at line 388 of file file.c.

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

◆ clnt_dlock()

static void clnt_dlock ( int  n)
static

Definition at line 302 of file file.c.

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

◆ dlock()

static void dlock ( enum rm_server  srv_id,
int  n 
)
static

Definition at line 250 of file file.c.

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

◆ file_encdec_test()

static void file_encdec_test ( struct rm_ut_data utdata)
static

Definition at line 167 of file file.c.

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

◆ fl_datum_set()

static void fl_datum_set ( struct rm_ut_data self)
static

Definition at line 132 of file file.c.

◆ fl_owner_set()

static void fl_owner_set ( struct rm_ut_data self)
static

Definition at line 107 of file file.c.

Here is the call graph for this function:

◆ fl_owner_unset()

static void fl_owner_unset ( struct rm_ut_data self)
static

Definition at line 119 of file file.c.

Here is the call graph for this function:

◆ fl_res_set()

static void fl_res_set ( struct rm_ut_data self)
static

Definition at line 86 of file file.c.

Here is the call graph for this function:

◆ fl_res_unset()

static void fl_res_unset ( struct rm_ut_data self)
static

Definition at line 97 of file file.c.

Here is the call graph for this function:

◆ fl_rtype_set()

static void fl_rtype_set ( struct rm_ut_data self)
static

Definition at line 66 of file file.c.

Here is the call graph for this function:

◆ fl_rtype_unset()

static void fl_rtype_unset ( struct rm_ut_data self)
static

Definition at line 80 of file file.c.

Here is the call graph for this function:

◆ 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:

◆ flock_srv_utdata_ops_set()

void flock_srv_utdata_ops_set ( struct rm_ut_data data)

Definition at line 162 of file file.c.

Here is the caller graph for this function:

◆ flock_test()

void flock_test ( void  )

Definition at line 514 of file file.c.

Here is the call graph for this function:

◆ flock_utfini()

static void flock_utfini ( void  )
static

Definition at line 478 of file file.c.

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

◆ flock_utinit()

static void flock_utinit ( void  )
static

Definition at line 453 of file file.c.

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

◆ rm_server_start()

static void rm_server_start ( const int  tid)
static

Definition at line 418 of file file.c.

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

◆ server_hier_config()

static void server_hier_config ( void  )
static

Definition at line 442 of file file.c.

Here is the caller graph for this function:

◆ server_lock_test()

static void server_lock_test ( void  )
static

Definition at line 332 of file file.c.

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

◆ server_tests()

static void server_tests ( void  )
static

Definition at line 405 of file file.c.

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

◆ srv_dlock()

static void srv_dlock ( int  n)
static

Definition at line 277 of file file.c.

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

◆ srv_dlock_run()

static void srv_dlock_run ( void  )
static

Definition at line 282 of file file.c.

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

◆ test_verify()

void test_verify ( enum flock_tests  test_id)

Definition at line 211 of file file.c.

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

◆ testcase1_run()

static void testcase1_run ( void  )
static

Definition at line 365 of file file.c.

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

◆ testcase2_run()

static void testcase2_run ( void  )
static

Definition at line 339 of file file.c.

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

◆ wait_lock()

static void wait_lock ( enum rm_server  srv_id)
static

Definition at line 194 of file file.c.

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

Variable Documentation

◆ clnt_counter

int clnt_counter
static

Definition at line 54 of file file.c.

◆ clnt_thr

struct m0_thread clnt_thr[CLNT_THR_NR]
static

Definition at line 52 of file file.c.

◆ fl_client_ut_data_ops

const struct rm_ut_data_ops fl_client_ut_data_ops
static
Initial value:
= {
.rtype_set = fl_rtype_set,
.rtype_unset = fl_rtype_unset,
.resource_set = fl_res_set,
.resource_unset = fl_res_unset,
.owner_set = fl_owner_set,
.owner_unset = fl_owner_unset,
.credit_datum_set = fl_datum_set
}
static void fl_owner_set(struct rm_ut_data *self)
Definition: file.c:107
static void fl_datum_set(struct rm_ut_data *self)
Definition: file.c:132
static void fl_owner_unset(struct rm_ut_data *self)
Definition: file.c:119
static void fl_res_set(struct rm_ut_data *self)
Definition: file.c:86
static void fl_rtype_unset(struct rm_ut_data *self)
Definition: file.c:80
static void fl_rtype_set(struct rm_ut_data *self)
Definition: file.c:66
static void fl_res_unset(struct rm_ut_data *self)
Definition: file.c:97

Definition at line 147 of file file.c.

◆ fl_srv_ut_data_ops

const struct rm_ut_data_ops fl_srv_ut_data_ops
static
Initial value:
= {
.rtype_set = fl_rtype_set,
.rtype_unset = fl_rtype_unset,
.resource_set = fl_res_set,
.resource_unset = fl_res_unset,
.owner_set = fl_owner_set,
.owner_unset = fl_owner_unset,
.credit_datum_set = fl_datum_set
}
static void fl_owner_set(struct rm_ut_data *self)
Definition: file.c:107
static void fl_datum_set(struct rm_ut_data *self)
Definition: file.c:132
static void fl_owner_unset(struct rm_ut_data *self)
Definition: file.c:119
static void fl_res_set(struct rm_ut_data *self)
Definition: file.c:86
static void fl_rtype_unset(struct rm_ut_data *self)
Definition: file.c:80
static void fl_rtype_set(struct rm_ut_data *self)
Definition: file.c:66
static void fl_res_unset(struct rm_ut_data *self)
Definition: file.c:97

Definition at line 137 of file file.c.

◆ srv_counter

int srv_counter
static

Definition at line 55 of file file.c.

◆ srv_thr

struct m0_thread srv_thr[SRV_THR_NR]
static

Definition at line 53 of file file.c.

◆ test_servers_nr

enum rm_server test_servers_nr
static

Definition at line 58 of file file.c.

◆ tests_clink

struct m0_clink tests_clink[LOCK_TESTS_NR]
static

Definition at line 59 of file file.c.