Motr  M0
file.c File Reference
#include <linux/version.h>
#include "m0t1fs/linux_kernel/file.c"
#include "ut/ut.h"
#include "lib/chan.h"
#include "lib/vec.h"
#include "fid/fid.h"
#include "lib/misc.h"
#include "lib/time.h"
#include "lib/finject.h"
#include "layout/layout.h"
#include "layout/linear_enum.h"
#include "fd/fd.h"
#include <linux/dcache.h>
#include "m0t1fs/linux_kernel/file_internal.h"
#include "m0t1fs/linux_kernel/m0t1fs.h"
#include "conf/helpers.h"
#include "reqh/reqh.h"
#include "lib/trace.h"
Include dependency graph for file.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_M0T1FS
 
#define LOCAL_EP   "0@lo:12345:45:1"
 

Enumerations

enum  {
  IOVEC_NR = 4, IOVEC_BUF_LEN = 1024, FILE_START_INDEX = 21340, LAY_N = 3,
  LAY_K = 1, LAY_P = LAY_N + 2 * LAY_K, UNIT_SIZE = 3 * PAGE_SIZE, INDEXPG = 2000,
  INDEXPG_STEP = 5000, DATA_SIZE = UNIT_SIZE * LAY_N, FID_KEY = 3, ATTR_A_CONST = 1,
  ATTR_B_CONST = 1, DGMODE_IOVEC_NR = 8
}
 

Functions

void fsync_test (void)
 
 M0_TL_DESCR_DECLARE (rpcbulk, M0_EXTERN)
 
 M0_TL_DECLARE (rpcbulk, M0_INTERNAL, struct m0_rpc_bulk_buf)
 
int m0t1fs_rpc_init (struct m0t1fs_sb *csb, const char *ep)
 
int m0t1fs_net_init (struct m0t1fs_sb *csb, const char *ep)
 
int m0t1fs_rm_service_start (struct m0t1fs_sb *csb)
 
int m0t1fs_ha_init (struct m0t1fs_sb *csb, const char *ha_addr)
 
void m0t1fs_rpc_fini (struct m0t1fs_sb *csb)
 
void m0t1fs_net_fini (struct m0t1fs_sb *csb)
 
void m0t1fs_ha_fini (struct m0t1fs_sb *csb)
 
static void ast_thread (struct m0t1fs_sb *csb)
 
static void ast_thread_stop (struct m0t1fs_sb *csb)
 
static int file_io_ut_init (void)
 
static int file_io_ut_fini (void)
 
static void ds_test (void)
 
static int dummy_readrest (struct pargrp_iomap *map)
 
static void pargrp_iomap_test (void)
 
static void helpers_test (void)
 
static void nw_xfer_ops_test (void)
 
static void target_ioreq_test (void)
 
static void dgmode_readio_test (void)
 

Variables

static struct super_block sb
 
static struct m0t1fs_sb csb
 
static struct m0_pdclust_attr pdattr
 
static struct m0_pdclust_layoutpdlay
 
static struct m0_layout_linear_enumllenum
 
static struct m0_layout_linear_attr llattr
 
static struct m0t1fs_inode ci
 
static struct file lfile
 
static struct m0_confcconfc = &csb.csb_reqh.rh_rconfc.rc_confc
 
static struct m0_rm_remote creditor
 
static bool runast = false
 
static struct m0_rpc_conn conn
 
static struct pargrp_iomap map
 
static struct io_request req
 
static char local_conf []
 
static struct dgmode_rwvec dgvec_tmp
 
struct m0_ut_suite file_io_ut
 

Macro Definition Documentation

◆ LOCAL_EP

#define LOCAL_EP   "0@lo:12345:45:1"

Definition at line 113 of file file.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_M0T1FS

Definition at line 52 of file file.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IOVEC_NR 
IOVEC_BUF_LEN 
FILE_START_INDEX 
LAY_N 
LAY_K 
LAY_P 
UNIT_SIZE 
INDEXPG 
INDEXPG_STEP 
DATA_SIZE 
FID_KEY 
ATTR_A_CONST 
ATTR_B_CONST 
DGMODE_IOVEC_NR 

Definition at line 58 of file file.c.

Function Documentation

◆ ast_thread()

static void ast_thread ( struct m0t1fs_sb *  csb)
static

Definition at line 178 of file file.c.

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

◆ ast_thread_stop()

static void ast_thread_stop ( struct m0t1fs_sb *  csb)
static

Definition at line 188 of file file.c.

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

◆ dgmode_readio_test()

static void dgmode_readio_test ( void  )
static

Definition at line 1035 of file file.c.

Here is the call graph for this function:

◆ ds_test()

static void ds_test ( void  )
static

Definition at line 365 of file file.c.

Here is the call graph for this function:

◆ dummy_readrest()

static int dummy_readrest ( struct pargrp_iomap map)
static

Definition at line 554 of file file.c.

Here is the caller graph for this function:

◆ file_io_ut_fini()

static int file_io_ut_fini ( void  )
static

Definition at line 335 of file file.c.

Here is the call graph for this function:

◆ file_io_ut_init()

static int file_io_ut_init ( void  )
static

Definition at line 195 of file file.c.

Here is the call graph for this function:

◆ fsync_test()

void fsync_test ( void  )

Definition at line 630 of file fsync.c.

Here is the call graph for this function:

◆ helpers_test()

static void helpers_test ( void  )
static

Definition at line 748 of file file.c.

Here is the call graph for this function:

◆ M0_TL_DECLARE()

M0_TL_DECLARE ( rpcbulk  ,
M0_INTERNAL  ,
struct m0_rpc_bulk_buf   
)

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( rpcbulk  ,
M0_EXTERN   
)

◆ m0t1fs_ha_fini()

void m0t1fs_ha_fini ( struct m0t1fs_sb *  csb)

Clears global HA session info and terminates rpc session to HA service.

Definition at line 507 of file super.c.

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

◆ m0t1fs_ha_init()

int m0t1fs_ha_init ( struct m0t1fs_sb *  csb,
const char *  ha_addr 
)

Establishes rpc session to HA service. The session is set up to be used globally.

Definition at line 478 of file super.c.

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

◆ m0t1fs_net_fini()

void m0t1fs_net_fini ( struct m0t1fs_sb *  csb)

Definition at line 618 of file super.c.

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

◆ m0t1fs_net_init()

int m0t1fs_net_init ( struct m0t1fs_sb *  csb,
const char *  ep 
)

Definition at line 573 of file super.c.

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

◆ m0t1fs_rm_service_start()

int m0t1fs_rm_service_start ( struct m0t1fs_sb *  csb)

Definition at line 542 of file super.c.

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

◆ m0t1fs_rpc_fini()

void m0t1fs_rpc_fini ( struct m0t1fs_sb *  csb)

Definition at line 703 of file super.c.

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

◆ m0t1fs_rpc_init()

int m0t1fs_rpc_init ( struct m0t1fs_sb *  csb,
const char *  ep 
)

Definition at line 631 of file super.c.

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

◆ nw_xfer_ops_test()

static void nw_xfer_ops_test ( void  )
static

Definition at line 786 of file file.c.

Here is the call graph for this function:

◆ pargrp_iomap_test()

static void pargrp_iomap_test ( void  )
static

Definition at line 559 of file file.c.

Here is the call graph for this function:

◆ target_ioreq_test()

static void target_ioreq_test ( void  )
static

Definition at line 864 of file file.c.

Here is the call graph for this function:

Variable Documentation

◆ ci

struct m0t1fs_inode ci
static

Definition at line 91 of file file.c.

◆ confc

struct m0_confc* confc = &csb.csb_reqh.rh_rconfc.rc_confc
static

Definition at line 94 of file file.c.

◆ conn

struct m0_rpc_conn conn
static

Definition at line 97 of file file.c.

◆ creditor

struct m0_rm_remote creditor
static

Definition at line 95 of file file.c.

◆ csb

struct m0t1fs_sb csb
static

Definition at line 86 of file file.c.

◆ dgvec_tmp

struct dgmode_rwvec dgvec_tmp
static

Definition at line 1034 of file file.c.

◆ file_io_ut

struct m0_ut_suite file_io_ut
Initial value:
= {
.ts_name = "file-io-ut",
.ts_init = file_io_ut_init,
.ts_fini = file_io_ut_fini,
.ts_tests = {
{"basic_data_structures_test", ds_test},
{"helper_routines_test", helpers_test},
{"parity_group_ops_test", pargrp_iomap_test},
{"nw_xfer_ops_test", nw_xfer_ops_test},
{"target_ioreq_ops_test", target_ioreq_test},
{"dgmode_readio_test", dgmode_readio_test},
{"fsync_test", fsync_test},
{NULL, NULL},
},
}
#define NULL
Definition: misc.h:38
static int file_io_ut_init(void)
Definition: file.c:195
static void dgmode_readio_test(void)
Definition: file.c:1035
static void ds_test(void)
Definition: file.c:365
static void nw_xfer_ops_test(void)
Definition: file.c:786
static void helpers_test(void)
Definition: file.c:748
static void target_ioreq_test(void)
Definition: file.c:864
static int file_io_ut_fini(void)
Definition: file.c:335
void fsync_test(void)
Definition: fsync.c:630
static void pargrp_iomap_test(void)
Definition: file.c:559

Definition at line 1259 of file file.c.

◆ lfile

struct file lfile
static

Definition at line 93 of file file.c.

◆ llattr

static struct m0_layout_linear_attr llattr
static

Definition at line 90 of file file.c.

◆ llenum

struct m0_layout_linear_enum* llenum
static

Definition at line 89 of file file.c.

◆ local_conf

char local_conf[]
static

Definition at line 115 of file file.c.

◆ map

struct pargrp_iomap map
static

Definition at line 99 of file file.c.

◆ pdattr

struct m0_pdclust_attr pdattr
static

Definition at line 87 of file file.c.

◆ pdlay

struct m0_pdclust_layout* pdlay
static

Definition at line 88 of file file.c.

◆ req

struct io_request req
static

Definition at line 100 of file file.c.

◆ runast

bool runast = false
static

Definition at line 96 of file file.c.

◆ sb

struct super_block sb
static

Definition at line 85 of file file.c.