Motr  M0
extmap.c File Reference
#include "lib/trace.h"
#include "lib/arith.h"
#include "lib/errno.h"
#include "lib/vec.h"
#include "lib/types.h"
#include "lib/ub.h"
#include "lib/misc.h"
#include "lib/finject.h"
#include "ut/ut.h"
#include "be/ut/helper.h"
#include "be/extmap.h"
Include dependency graph for extmap.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_EXTMAP
 
#define EXTMAP_UT_UNIT_SIZE   10
 
#define EXTMAP_UT_CS_SIZE   16
 

Functions

static void emap_be_alloc (struct m0_be_tx *tx)
 
static void emap_be_free (struct m0_be_tx *tx)
 
static void checkpoint (void)
 
static void test_obj_init (struct m0_be_tx *tx)
 
static void test_obj_fini (struct m0_be_tx *tx)
 
static void test_init (void)
 
static void test_fini (void)
 
static int be_emap_lookup (struct m0_be_emap *map, const struct m0_uint128 *prefix, m0_bindex_t offset, struct m0_be_emap_cursor *it)
 
static void test_lookup (void)
 
static void split (m0_bindex_t offset, int nr, bool commit)
 
static void test_split (void)
 
static int test_print (void)
 
static void test_next_prev (void)
 
static void test_merge (void)
 
static void test_paste (void)
 
static void test_paste_checksum_validation (void)
 
void m0_be_ut_emap (void)
 

Variables

static struct m0_be_ut_backend be_ut_emap_backend
 
static struct m0_be_ut_seg be_ut_emap_seg
 
static struct m0_be_tx tx1
 
static struct m0_be_tx tx2
 
static struct m0_be_emapemap
 
static struct m0_uint128 prefix
 
static struct m0_be_emap_cursor it
 
static struct m0_be_emap_segseg
 
static struct m0_be_segbe_seg
 
static struct m0_be_opit_op
 

Macro Definition Documentation

◆ EXTMAP_UT_CS_SIZE

#define EXTMAP_UT_CS_SIZE   16

Definition at line 37 of file extmap.c.

◆ EXTMAP_UT_UNIT_SIZE

#define EXTMAP_UT_UNIT_SIZE   10

Definition at line 36 of file extmap.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_EXTMAP

Definition at line 23 of file extmap.c.

Function Documentation

◆ be_emap_lookup()

static int be_emap_lookup ( struct m0_be_emap map,
const struct m0_uint128 prefix,
m0_bindex_t  offset,
struct m0_be_emap_cursor it 
)
static

Definition at line 181 of file extmap.c.

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

◆ checkpoint()

static void checkpoint ( void  )
static

Definition at line 91 of file extmap.c.

Here is the caller graph for this function:

◆ emap_be_alloc()

static void emap_be_alloc ( struct m0_be_tx tx)
static

Definition at line 51 of file extmap.c.

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

◆ emap_be_free()

static void emap_be_free ( struct m0_be_tx tx)
static

Definition at line 71 of file extmap.c.

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

◆ m0_be_ut_emap()

void m0_be_ut_emap ( void  )

Definition at line 733 of file extmap.c.

Here is the call graph for this function:

◆ split()

static void split ( m0_bindex_t  offset,
int  nr,
bool  commit 
)
static

Definition at line 230 of file extmap.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 168 of file extmap.c.

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

◆ test_init()

static void test_init ( void  )
static

XXX

Todo:
break UT into small transactions

Definition at line 113 of file extmap.c.

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

◆ test_lookup()

static void test_lookup ( void  )
static

Definition at line 198 of file extmap.c.

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

◆ test_merge()

static void test_merge ( void  )
static

Definition at line 372 of file extmap.c.

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

◆ test_next_prev()

static void test_next_prev ( void  )
static

Definition at line 332 of file extmap.c.

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

◆ test_obj_fini()

static void test_obj_fini ( struct m0_be_tx tx)
static

Definition at line 101 of file extmap.c.

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

◆ test_obj_init()

static void test_obj_init ( struct m0_be_tx tx)
static

Definition at line 95 of file extmap.c.

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

◆ test_paste()

static void test_paste ( void  )
static

Definition at line 392 of file extmap.c.

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

◆ test_paste_checksum_validation()

static void test_paste_checksum_validation ( void  )
static

Definition at line 520 of file extmap.c.

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

◆ test_print()

static int test_print ( void  )
static

Definition at line 291 of file extmap.c.

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

◆ test_split()

static void test_split ( void  )
static

Definition at line 286 of file extmap.c.

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

Variable Documentation

◆ be_seg

struct m0_be_seg* be_seg
static

Definition at line 48 of file extmap.c.

◆ be_ut_emap_backend

struct m0_be_ut_backend be_ut_emap_backend
static

Definition at line 39 of file extmap.c.

◆ be_ut_emap_seg

struct m0_be_ut_seg be_ut_emap_seg
static

Definition at line 40 of file extmap.c.

◆ emap

struct m0_be_emap* emap
static

Definition at line 44 of file extmap.c.

◆ it

struct m0_be_emap_cursor it
static

Definition at line 46 of file extmap.c.

◆ it_op

struct m0_be_op* it_op
static

Definition at line 49 of file extmap.c.

◆ prefix

struct m0_uint128 prefix
static

Definition at line 45 of file extmap.c.

◆ seg

struct m0_be_emap_seg* seg
static

Definition at line 47 of file extmap.c.

◆ tx1

struct m0_be_tx tx1
static

Definition at line 42 of file extmap.c.

◆ tx2

struct m0_be_tx tx2
static

Definition at line 43 of file extmap.c.