Motr  M0
seg.c File Reference
#include "lib/trace.h"
#include "be/seg.h"
#include "lib/types.h"
#include "lib/arith.h"
#include "lib/thread.h"
#include "lib/semaphore.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "ut/ut.h"
#include "ut/stob.h"
#include "be/ut/helper.h"
Include dependency graph for seg.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 

Enumerations

enum  { BE_UT_SEG_SIZE = 0x20000, BE_UT_SEG_IO_ITER = 0x400, BE_UT_SEG_IO_OFFS = 0x10000, BE_UT_SEG_IO_SIZE = 0x10000 }
 
enum  { BE_UT_SEG_THREAD_NR = 0x10, BE_UT_SEG_PER_THREAD = 0x10, BE_UT_SEG_MULTIPLE_SIZE = 0x10000 }
 
enum  { BE_UT_SEG_LARGE_SIZE = 1ULL << 27, BE_UT_SEG_LARGE_STEP = 512, BE_UT_SEG_LARGE_IO_BLOCK = 1ULL << 24 }
 

Functions

 M0_BASSERT (BE_UT_SEG_IO_OFFS+BE_UT_SEG_IO_SIZE<=BE_UT_SEG_SIZE)
 
M0_INTERNAL void m0_be_ut_seg_open_close (void)
 
static void be_ut_seg_rand_reg (struct m0_be_reg *reg, void *seg_addr, m0_bindex_t *offset, m0_bcount_t *size, uint64_t *seed)
 
M0_INTERNAL void m0_be_ut_seg_io (void)
 
static void be_ut_seg_thread_func (struct m0_semaphore *barrier)
 
void m0_be_ut_seg_multiple (void)
 
static void be_ut_seg_large_mem (struct m0_be_seg *seg, char byte, m0_bcount_t size, bool check)
 
static void be_ut_seg_large_block_io (struct m0_be_seg *seg, m0_bindex_t offset, m0_bcount_t block_size, char *block, bool read)
 
static void be_ut_seg_large_stob (struct m0_be_seg *seg, char byte, m0_bcount_t size, bool check)
 
void m0_be_ut_seg_large (void)
 
void m0_be_ut_seg_large_multiple (void)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 23 of file seg.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_SEG_SIZE 
BE_UT_SEG_IO_ITER 
BE_UT_SEG_IO_OFFS 
BE_UT_SEG_IO_SIZE 

Definition at line 39 of file seg.c.

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_SEG_THREAD_NR 
BE_UT_SEG_PER_THREAD 
BE_UT_SEG_MULTIPLE_SIZE 

Definition at line 125 of file seg.c.

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_SEG_LARGE_SIZE 
BE_UT_SEG_LARGE_STEP 
BE_UT_SEG_LARGE_IO_BLOCK 

Definition at line 176 of file seg.c.

Function Documentation

◆ be_ut_seg_large_block_io()

static void be_ut_seg_large_block_io ( struct m0_be_seg seg,
m0_bindex_t  offset,
m0_bcount_t  block_size,
char *  block,
bool  read 
)
static

Definition at line 208 of file seg.c.

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

◆ be_ut_seg_large_mem()

static void be_ut_seg_large_mem ( struct m0_be_seg seg,
char  byte,
m0_bcount_t  size,
bool  check 
)
static

Definition at line 190 of file seg.c.

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

◆ be_ut_seg_large_stob()

static void be_ut_seg_large_stob ( struct m0_be_seg seg,
char  byte,
m0_bcount_t  size,
bool  check 
)
static

Definition at line 230 of file seg.c.

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

◆ be_ut_seg_rand_reg()

static void be_ut_seg_rand_reg ( struct m0_be_reg reg,
void *  seg_addr,
m0_bindex_t offset,
m0_bcount_t size,
uint64_t *  seed 
)
static

Definition at line 55 of file seg.c.

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

◆ be_ut_seg_thread_func()

static void be_ut_seg_thread_func ( struct m0_semaphore barrier)
static

Definition at line 131 of file seg.c.

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

◆ M0_BASSERT()

M0_BASSERT ( BE_UT_SEG_IO_OFFS+BE_UT_SEG_IO_SIZE<=  BE_UT_SEG_SIZE)

◆ m0_be_ut_seg_io()

M0_INTERNAL void m0_be_ut_seg_io ( void  )

Definition at line 67 of file seg.c.

Here is the call graph for this function:

◆ m0_be_ut_seg_large()

void m0_be_ut_seg_large ( void  )

Definition at line 275 of file seg.c.

Here is the call graph for this function:

◆ m0_be_ut_seg_large_multiple()

void m0_be_ut_seg_large_multiple ( void  )

Definition at line 330 of file seg.c.

Here is the call graph for this function:

◆ m0_be_ut_seg_multiple()

void m0_be_ut_seg_multiple ( void  )

Definition at line 143 of file seg.c.

Here is the call graph for this function:

◆ m0_be_ut_seg_open_close()

M0_INTERNAL void m0_be_ut_seg_open_close ( void  )

Definition at line 47 of file seg.c.

Here is the call graph for this function: