Motr  M0
recovery.c File Reference
#include "be/io.h"
#include "be/log.h"
#include "be/recovery.h"
#include "lib/memory.h"
#include "stob/domain.h"
#include "stob/stob.h"
#include "ut/stob.h"
#include "ut/ut.h"
Include dependency graph for recovery.c:

Go to the source code of this file.

Data Structures

struct  be_ut_recovery_ctx
 

Enumerations

enum  {
  BE_UT_RECOVERY_LOG_SIZE = 1024 * 1024, BE_UT_RECOVERY_LOG_RESERVE_SIZE = 4096, BE_UT_RECOVERY_LOG_LIO_SIZE = 1500, BE_UT_RECOVERY_LOG_STOB_DOMAIN_KEY = 100,
  BE_UT_RECOVERY_LOG_STOB_KEY = 42, BE_UT_RECOVERY_LOG_RBUF_NR = 8
}
 

Functions

static void be_ut_log_got_space_cb (struct m0_be_log *log)
 
static void be_ut_recovery_log_cfg_set (struct m0_be_log_cfg *log_cfg, struct m0_stob_domain *sdom, struct m0_mutex *lock)
 
static void be_ut_recovery_log_init (struct be_ut_recovery_ctx *ctx)
 
static void be_ut_recovery_log_fini (struct be_ut_recovery_ctx *ctx)
 
static void be_ut_recovery_log_open (struct be_ut_recovery_ctx *ctx)
 
static void be_ut_recovery_log_close (struct be_ut_recovery_ctx *ctx)
 
static void be_ut_recovery_log_reopen (struct be_ut_recovery_ctx *ctx)
 
static void be_ut_recovery_log_record_init_one (struct m0_be_log_record *record, struct m0_be_log *log)
 
static void be_ut_recovery_log_record_fini_one (struct m0_be_log_record *record)
 
static void be_ut_recovery_log_fill (struct be_ut_recovery_ctx *ctx, int record_nr, int discard_nr, bool last_incomplete)
 
static int be_ut_recovery_iter_count (struct be_ut_recovery_ctx *ctx)
 
void m0_be_ut_recovery (void)
 

Variables

const char * be_ut_recovery_log_sdom_location = "linuxstob:./log"
 
const char * be_ut_recovery_log_sdom_init_cfg = "directio=true"
 
const char * be_ut_recovery_log_sdom_create_cfg = ""
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BE_UT_RECOVERY_LOG_SIZE 
BE_UT_RECOVERY_LOG_RESERVE_SIZE 
BE_UT_RECOVERY_LOG_LIO_SIZE 
BE_UT_RECOVERY_LOG_STOB_DOMAIN_KEY 
BE_UT_RECOVERY_LOG_STOB_KEY 
BE_UT_RECOVERY_LOG_RBUF_NR 

Definition at line 32 of file recovery.c.

Function Documentation

◆ be_ut_log_got_space_cb()

static void be_ut_log_got_space_cb ( struct m0_be_log log)
static

Definition at line 52 of file recovery.c.

Here is the caller graph for this function:

◆ be_ut_recovery_iter_count()

static int be_ut_recovery_iter_count ( struct be_ut_recovery_ctx ctx)
static

Definition at line 194 of file recovery.c.

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

◆ be_ut_recovery_log_cfg_set()

static void be_ut_recovery_log_cfg_set ( struct m0_be_log_cfg log_cfg,
struct m0_stob_domain sdom,
struct m0_mutex lock 
)
static

Definition at line 56 of file recovery.c.

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

◆ be_ut_recovery_log_close()

static void be_ut_recovery_log_close ( struct be_ut_recovery_ctx ctx)
static

Definition at line 117 of file recovery.c.

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

◆ be_ut_recovery_log_fill()

static void be_ut_recovery_log_fill ( struct be_ut_recovery_ctx ctx,
int  record_nr,
int  discard_nr,
bool  last_incomplete 
)
static

Definition at line 147 of file recovery.c.

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

◆ be_ut_recovery_log_fini()

static void be_ut_recovery_log_fini ( struct be_ut_recovery_ctx ctx)
static

Definition at line 97 of file recovery.c.

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

◆ be_ut_recovery_log_init()

static void be_ut_recovery_log_init ( struct be_ut_recovery_ctx ctx)
static

Definition at line 80 of file recovery.c.

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

◆ be_ut_recovery_log_open()

static void be_ut_recovery_log_open ( struct be_ut_recovery_ctx ctx)
static

Definition at line 107 of file recovery.c.

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

◆ be_ut_recovery_log_record_fini_one()

static void be_ut_recovery_log_record_fini_one ( struct m0_be_log_record record)
static

Definition at line 141 of file recovery.c.

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

◆ be_ut_recovery_log_record_init_one()

static void be_ut_recovery_log_record_init_one ( struct m0_be_log_record record,
struct m0_be_log log 
)
static

Definition at line 129 of file recovery.c.

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

◆ be_ut_recovery_log_reopen()

static void be_ut_recovery_log_reopen ( struct be_ut_recovery_ctx ctx)
static

Definition at line 122 of file recovery.c.

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

◆ m0_be_ut_recovery()

void m0_be_ut_recovery ( void  )

Definition at line 230 of file recovery.c.

Here is the call graph for this function:

Variable Documentation

◆ be_ut_recovery_log_sdom_create_cfg

const char* be_ut_recovery_log_sdom_create_cfg = ""

Definition at line 43 of file recovery.c.

◆ be_ut_recovery_log_sdom_init_cfg

const char* be_ut_recovery_log_sdom_init_cfg = "directio=true"

Definition at line 42 of file recovery.c.

◆ be_ut_recovery_log_sdom_location

const char* be_ut_recovery_log_sdom_location = "linuxstob:./log"

Definition at line 41 of file recovery.c.