Motr  M0
mdstore.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "lib/ub.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/misc.h"
#include "lib/bitstring.h"
#include "lib/processor.h"
#include "fop/fop.h"
#include "cob/cob.h"
#include "reqh/reqh.h"
#include "mdstore/mdstore.h"
#include "net/net.h"
#include "ut/ut.h"
#include "ut/be.h"
#include "ut/stob.h"
#include "be/ut/helper.h"
#include "mdservice/fsync_foms.c"
#include "mdservice/ut/mdstore.h"
#include "mdservice/ut/lustre.h"
Include dependency graph for mdstore.c:

Go to the source code of this file.

Enumerations

enum  { REC_NR = 128 }
 

Functions

int m0_md_lustre_fop_alloc (struct m0_fop **fop, void *data, struct m0_rpc_machine *mach)
 
static void fom_fini (struct m0_fom *fom)
 
static int fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
static void test_mkfs (void)
 
static void test_init (void)
 
static void test_fini (void)
 
static void test_mdops (void)
 
static void ut_fsync_create_fom (void)
 

Variables

static struct m0_cob_domain_id id = { 42 }
 
static struct m0_sm_groupgrp
 
static struct m0_be_ut_backend ut_be
 
static struct m0_be_segbe_seg
 
static struct m0_mdstore md
 
static struct m0_reqh reqh
 
static struct m0_reqh_servicemdservice
 
struct m0_reqh_service_type m0_mds_type
 
struct m0_rpc_machine machine
 
static struct m0_semaphore inflight
 
static int error = 0
 
static void(* orig_fom_fini )(struct m0_fom *fom) = NULL
 
static int(* orig_fom_create )(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
void(* m0_md_req_fom_fini_func )(struct m0_fom *fom)
 
struct m0_fom_type_ops m0_md_fom_ops
 
struct m0_ut_suite mdservice_ut
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REC_NR 

Definition at line 197 of file mdstore.c.

Function Documentation

◆ fom_create()

static int fom_create ( struct m0_fop fop,
struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 80 of file mdstore.c.

Here is the caller graph for this function:

◆ fom_fini()

static void fom_fini ( struct m0_fom fom)
static

Definition at line 70 of file mdstore.c.

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

◆ m0_md_lustre_fop_alloc()

int m0_md_lustre_fop_alloc ( struct m0_fop **  fop,
void *  data,
struct m0_rpc_machine mach 
)

Definition at line 205 of file lustre.c.

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

◆ test_fini()

static void test_fini ( void  )
static

Definition at line 171 of file mdstore.c.

Here is the call graph for this function:

◆ test_init()

static void test_init ( void  )
static

Definition at line 150 of file mdstore.c.

Here is the call graph for this function:

◆ test_mdops()

static void test_mdops ( void  )
static

Definition at line 199 of file mdstore.c.

Here is the call graph for this function:

◆ test_mkfs()

static void test_mkfs ( void  )
static

Definition at line 93 of file mdstore.c.

Here is the call graph for this function:

◆ ut_fsync_create_fom()

static void ut_fsync_create_fom ( void  )
static

Definition at line 247 of file mdstore.c.

Here is the call graph for this function:

Variable Documentation

◆ be_seg

struct m0_be_seg* be_seg
static

Definition at line 52 of file mdstore.c.

◆ error

int error = 0
static

Definition at line 64 of file mdstore.c.

◆ grp

struct m0_sm_group* grp
static

Definition at line 50 of file mdstore.c.

◆ id

struct m0_cob_domain_id id = { 42 }
static

Definition at line 48 of file mdstore.c.

◆ inflight

struct m0_semaphore inflight
static

Definition at line 63 of file mdstore.c.

◆ m0_md_fom_ops

struct m0_fom_type_ops m0_md_fom_ops

Definition at line 44 of file md_fops.c.

◆ m0_md_req_fom_fini_func

void(* m0_md_req_fom_fini_func) (struct m0_fom *fom)

md fom finaliser is called indirectly through this pointer so that UT can redirect it.

Definition at line 1326 of file md_foms.c.

◆ machine

struct m0_rpc_machine machine

Definition at line 58 of file mdstore.c.

◆ md

struct m0_mdstore md
static

Definition at line 54 of file mdstore.c.

◆ mdservice

struct m0_reqh_service* mdservice
static

Definition at line 56 of file mdstore.c.

◆ mdservice_ut

struct m0_ut_suite mdservice_ut
Initial value:
= {
.ts_name = "mdservice-ut",
.ts_tests = {
{ "mdservice-mkfs", test_mkfs },
{ "mdservice-init", test_init },
{ "mdservice-ops", test_mdops },
{ "mdservice-fsync", ut_fsync_create_fom},
{ "mdservice-fini", test_fini },
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
static void test_mkfs(void)
Definition: mdstore.c:93
static void test_init(void)
Definition: mdstore.c:150
static void ut_fsync_create_fom(void)
Definition: mdstore.c:247
static void test_fini(void)
Definition: mdstore.c:171
static void test_mdops(void)
Definition: mdstore.c:199

Definition at line 296 of file mdstore.c.

◆ orig_fom_create

int(* orig_fom_create) (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
static

Definition at line 67 of file mdstore.c.

◆ orig_fom_fini

void(* orig_fom_fini) (struct m0_fom *fom) = NULL
static

Definition at line 66 of file mdstore.c.

◆ reqh

struct m0_reqh reqh
static

Definition at line 55 of file mdstore.c.

◆ ut_be

struct m0_be_ut_backend ut_be
static

Definition at line 51 of file mdstore.c.