Motr  M0
log_store.c File Reference
#include "lib/trace.h"
#include "be/log_store.h"
#include "be/op.h"
#include "be/log_sched.h"
#include "lib/misc.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/string.h"
#include "ut/ut.h"
#include "ut/stob.h"
#include "stob/domain.h"
#include "stob/stob.h"
Include dependency graph for log_store.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define BE_UT_LOG_STORE_SDOM_INIT_CFG   "directio=true"
 

Enumerations

enum  {
  BE_UT_LOG_STORE_STOB_DOMAIN_KEY = 0x100, BE_UT_LOG_STORE_STOB_KEY_BEGIN = 0x42, BE_UT_LOG_STORE_SIZE = 0x40000, BE_UT_LOG_STORE_NR = 0x10,
  BE_UT_LOG_STORE_RBUF_NR = 0x8, BE_UT_LOG_STORE_RBUF_SIZE = 0x456
}
 
enum  { BE_UT_LOG_STORE_IO_WINDOW_STEP = 0x1, BE_UT_LOG_STORE_IO_WINDOW_STEP_NR = 0x100000 }
 
enum  { BE_UT_LOG_STORE_IO_DISCARD_STEP = 0x11, BE_UT_LOG_STORE_IO_DISCARD_STEP_NR = 0x10000 }
 
enum  { BE_UT_LOG_STORE_IO_TRANSLATE_STEP = 0x1, BE_UT_LOG_STORE_IO_TRANSLATE_STEP_NR = 0x400, BE_UT_LOG_STORE_IO_NR = 0x10 }
 

Functions

static void be_ut_log_store_stob_domain_init (struct m0_stob_domain **sdom)
 
static void be_ut_log_store_stob_domain_fini (struct m0_stob_domain *sdom)
 
void m0_be_ut_log_store_create_simple (void)
 
void m0_be_ut_log_store_create_random (void)
 
static void be_ut_log_store_test (void(*func)(struct m0_be_log_store *ls, bool first_run))
 
static void be_ut_log_store_io_window (struct m0_be_log_store *ls, bool first_run)
 
void m0_be_ut_log_store_io_window (void)
 
static void be_ut_log_store_io_discard (struct m0_be_log_store *ls, bool first_run)
 
void m0_be_ut_log_store_io_discard (void)
 
static void be_ut_log_store_length_generate (m0_bcount_t *io_length, unsigned nr, uint64_t *seed)
 
static void be_ut_log_store_io_intersect_check (struct m0_be_log_io **lio, unsigned nr)
 
static void be_ut_log_store_io_translate (struct m0_be_log_store *ls, bool first_run)
 
void m0_be_ut_log_store_io_translate (void)
 
static void be_ut_log_store_rbuf (struct m0_be_log_store *ls, bool first_run)
 
void m0_be_ut_log_store_rbuf (void)
 

Variables

static const char * be_ut_log_store_sdom_location = "linuxstob:./log_store"
 
static const char * be_ut_log_store_sdom_init_cfg
 
static const char * be_ut_log_store_sdom_create_cfg = ""
 
static struct m0_be_log_store_cfg be_ut_log_store_cfg
 

Macro Definition Documentation

◆ BE_UT_LOG_STORE_SDOM_INIT_CFG

#define BE_UT_LOG_STORE_SDOM_INIT_CFG   "directio=true"

Definition at line 268 of file log_store.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 23 of file log_store.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_LOG_STORE_STOB_DOMAIN_KEY 
BE_UT_LOG_STORE_STOB_KEY_BEGIN 
BE_UT_LOG_STORE_SIZE 
BE_UT_LOG_STORE_NR 
BE_UT_LOG_STORE_RBUF_NR 
BE_UT_LOG_STORE_RBUF_SIZE 

Definition at line 259 of file log_store.c.

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_LOG_STORE_IO_WINDOW_STEP 
BE_UT_LOG_STORE_IO_WINDOW_STEP_NR 

Definition at line 441 of file log_store.c.

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_LOG_STORE_IO_DISCARD_STEP 
BE_UT_LOG_STORE_IO_DISCARD_STEP_NR 

Definition at line 474 of file log_store.c.

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_LOG_STORE_IO_TRANSLATE_STEP 
BE_UT_LOG_STORE_IO_TRANSLATE_STEP_NR 
BE_UT_LOG_STORE_IO_NR 

Definition at line 504 of file log_store.c.

Function Documentation

◆ be_ut_log_store_io_discard()

static void be_ut_log_store_io_discard ( struct m0_be_log_store ls,
bool  first_run 
)
static

Definition at line 479 of file log_store.c.

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

◆ be_ut_log_store_io_intersect_check()

static void be_ut_log_store_io_intersect_check ( struct m0_be_log_io **  lio,
unsigned  nr 
)
static

Definition at line 532 of file log_store.c.

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

◆ be_ut_log_store_io_translate()

static void be_ut_log_store_io_translate ( struct m0_be_log_store ls,
bool  first_run 
)
static

Definition at line 550 of file log_store.c.

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

◆ be_ut_log_store_io_window()

static void be_ut_log_store_io_window ( struct m0_be_log_store ls,
bool  first_run 
)
static

Definition at line 447 of file log_store.c.

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

◆ be_ut_log_store_length_generate()

static void be_ut_log_store_length_generate ( m0_bcount_t io_length,
unsigned  nr,
uint64_t *  seed 
)
static

Definition at line 510 of file log_store.c.

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

◆ be_ut_log_store_rbuf()

static void be_ut_log_store_rbuf ( struct m0_be_log_store ls,
bool  first_run 
)
static

Definition at line 654 of file log_store.c.

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

◆ be_ut_log_store_stob_domain_fini()

static void be_ut_log_store_stob_domain_fini ( struct m0_stob_domain sdom)
static

Definition at line 303 of file log_store.c.

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

◆ be_ut_log_store_stob_domain_init()

static void be_ut_log_store_stob_domain_init ( struct m0_stob_domain **  sdom)
static

Definition at line 289 of file log_store.c.

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

◆ be_ut_log_store_test()

static void be_ut_log_store_test ( void(*)(struct m0_be_log_store *ls, bool first_run)  func)
static

Definition at line 413 of file log_store.c.

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

◆ m0_be_ut_log_store_create_random()

void m0_be_ut_log_store_create_random ( void  )

Definition at line 372 of file log_store.c.

Here is the call graph for this function:

◆ m0_be_ut_log_store_create_simple()

void m0_be_ut_log_store_create_simple ( void  )
Todo:
use ls_cfg_create and ls_cfg_open to test that create parameters aren't used in open()

Definition at line 311 of file log_store.c.

Here is the call graph for this function:

◆ m0_be_ut_log_store_io_discard()

void m0_be_ut_log_store_io_discard ( void  )

Definition at line 499 of file log_store.c.

Here is the call graph for this function:

◆ m0_be_ut_log_store_io_translate()

void m0_be_ut_log_store_io_translate ( void  )

Definition at line 649 of file log_store.c.

Here is the call graph for this function:

◆ m0_be_ut_log_store_io_window()

void m0_be_ut_log_store_io_window ( void  )

Definition at line 469 of file log_store.c.

Here is the call graph for this function:

◆ m0_be_ut_log_store_rbuf()

void m0_be_ut_log_store_rbuf ( void  )

Definition at line 734 of file log_store.c.

Here is the call graph for this function:

Variable Documentation

◆ be_ut_log_store_cfg

struct m0_be_log_store_cfg be_ut_log_store_cfg
static
Initial value:
= {
.lsc_stob_domain_location = "linuxstob:./log_store-tmp",
.lsc_stob_domain_init_cfg = BE_UT_LOG_STORE_SDOM_INIT_CFG,
.lsc_stob_domain_key = 0x1000,
.lsc_stob_domain_create_cfg = NULL,
.lsc_size = BE_UT_LOG_STORE_SIZE,
.lsc_stob_create_cfg = NULL,
.lsc_rbuf_nr = BE_UT_LOG_STORE_RBUF_NR,
.lsc_rbuf_size = BE_UT_LOG_STORE_RBUF_SIZE,
}
#define NULL
Definition: misc.h:38
#define BE_UT_LOG_STORE_SDOM_INIT_CFG
Definition: log_store.c:268

Definition at line 275 of file log_store.c.

◆ be_ut_log_store_sdom_create_cfg

const char* be_ut_log_store_sdom_create_cfg = ""
static

Definition at line 273 of file log_store.c.

◆ be_ut_log_store_sdom_init_cfg

const char* be_ut_log_store_sdom_init_cfg
static
Initial value:
=
#define BE_UT_LOG_STORE_SDOM_INIT_CFG
Definition: log_store.c:268

Definition at line 271 of file log_store.c.

◆ be_ut_log_store_sdom_location

const char* be_ut_log_store_sdom_location = "linuxstob:./log_store"
static

Definition at line 270 of file log_store.c.