Motr  M0
fd.c File Reference
#include "fd/fd.h"
#include "fd/fd_internal.h"
#include "fd/ut/common.h"
#include "pool/pool.h"
#include "conf/confc.h"
#include "conf/diter.h"
#include "conf/obj_ops.h"
#include "lib/memory.h"
#include "lib/fs.h"
#include "lib/errno.h"
#include "conf/ut/common.h"
#include "ut/ut.h"
Include dependency graph for fd.c:

Go to the source code of this file.

Functions

static uint32_t parity_group_size (struct m0_pdclust_attr *la_attr)
 
static uint32_t pool_width_count (uint64_t *children, uint32_t depth)
 
static bool __filter_pv (const struct m0_conf_obj *obj)
 
static uint64_t real_child_cnt_get (uint64_t level)
 
static uint64_t pool_width_calc (struct m0_fd_tree *tree)
 
static void tree_generate (struct m0_pool_version *pv, enum tree_attr ta)
 
static void fd_mapping_check (struct m0_pool_version *pv)
 
static bool is_tgt_failed (struct m0_pool_version *pv, struct m0_pdclust_tgt_addr *tgt, uint64_t *failed_domains)
 
static void failed_nodes_mark (struct m0_fd_tree *tree, uint32_t level, uint64_t tol, uint64_t *failed_domains)
 
static void fd_tolerance_check (struct m0_pool_version *pv)
 
static void test_fd_mapping_sanity (enum tree_attr ta)
 
static void test_ft_mapping (void)
 
static void test_pv2fd_conv (void)
 
static uint64_t pv2tree_level_conv (uint64_t level, uint64_t tree_depth)
 
void test_fd_mapping (void)
 

Variables

struct m0_pdclust_attr pd_attr
 
struct m0_pdclust_instance pi
 
struct m0_pdclust_src_addr src
 
struct m0_pdclust_src_addr src_new
 
struct m0_pdclust_tgt_addr tgt
 
struct m0_pool_version pool_ver
 
struct m0_ut_suite failure_domains_ut
 

Function Documentation

◆ __filter_pv()

static bool __filter_pv ( const struct m0_conf_obj obj)
static

Definition at line 426 of file fd.c.

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

◆ failed_nodes_mark()

static void failed_nodes_mark ( struct m0_fd_tree tree,
uint32_t  level,
uint64_t  tol,
uint64_t *  failed_domains 
)
static

Definition at line 482 of file fd.c.

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

◆ fd_mapping_check()

static void fd_mapping_check ( struct m0_pool_version pv)
static

Definition at line 192 of file fd.c.

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

◆ fd_tolerance_check()

static void fd_tolerance_check ( struct m0_pool_version pv)
static

Definition at line 437 of file fd.c.

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

◆ is_tgt_failed()

static bool is_tgt_failed ( struct m0_pool_version pv,
struct m0_pdclust_tgt_addr tgt,
uint64_t *  failed_domains 
)
static

Definition at line 513 of file fd.c.

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

◆ parity_group_size()

static uint32_t parity_group_size ( struct m0_pdclust_attr la_attr)
static

Definition at line 311 of file fd.c.

Here is the caller graph for this function:

◆ pool_width_calc()

static uint64_t pool_width_calc ( struct m0_fd_tree tree)
static

Definition at line 178 of file fd.c.

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

◆ pool_width_count()

static uint32_t pool_width_count ( uint64_t *  children,
uint32_t  depth 
)
static

Definition at line 319 of file fd.c.

Here is the caller graph for this function:

◆ pv2tree_level_conv()

static uint64_t pv2tree_level_conv ( uint64_t  level,
uint64_t  tree_depth 
)
static

Definition at line 431 of file fd.c.

Here is the caller graph for this function:

◆ real_child_cnt_get()

static uint64_t real_child_cnt_get ( uint64_t  level)
static

Definition at line 240 of file fd.c.

Here is the caller graph for this function:

◆ test_fd_mapping()

void test_fd_mapping ( void  )

Definition at line 535 of file fd.c.

Here is the call graph for this function:

◆ test_fd_mapping_sanity()

static void test_fd_mapping_sanity ( enum tree_attr  ta)
static

Definition at line 127 of file fd.c.

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

◆ test_ft_mapping()

static void test_ft_mapping ( void  )
static

Definition at line 259 of file fd.c.

Here is the call graph for this function:

◆ test_pv2fd_conv()

static void test_pv2fd_conv ( void  )
static

Definition at line 331 of file fd.c.

Here is the call graph for this function:

◆ tree_generate()

static void tree_generate ( struct m0_pool_version pv,
enum tree_attr  ta 
)
static

Definition at line 138 of file fd.c.

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

Variable Documentation

◆ failure_domains_ut

struct m0_ut_suite failure_domains_ut
Initial value:
= {
.ts_name = "failure_domains-ut",
.ts_tests = {
{"test_ft_mapping", test_ft_mapping},
{"test_pv2fd_conv", test_pv2fd_conv},
{"test_fd_mapping", test_fd_mapping},
{ NULL, NULL }
}
}
#define NULL
Definition: misc.h:38
void test_fd_mapping(void)
Definition: fd.c:535
static void test_ft_mapping(void)
Definition: fd.c:259
M0_INTERNAL int m0_conf_ut_ast_thread_fini(void)
Definition: common.c:96
static void test_pv2fd_conv(void)
Definition: fd.c:331
M0_INTERNAL int m0_conf_ut_ast_thread_init(void)
Definition: common.c:86

Definition at line 541 of file fd.c.

◆ pd_attr

struct m0_pdclust_attr pd_attr
Initial value:
= {
.pa_N = la_N,
.pa_K = la_K,
.pa_S = la_S,
.pa_P = la_N + la_K + la_S,
.pa_unit_size = 4096,
.pa_seed = {
.u_hi = 0,
.u_lo = 0,
}
}
Definition: common.h:30
Definition: common.h:29
Definition: common.h:31

Definition at line 95 of file fd.c.

◆ pi

Definition at line 107 of file fd.c.

◆ pool_ver

struct m0_pool_version pool_ver

Definition at line 111 of file fd.c.

◆ src

struct m0_pdclust_src_addr src

Definition at line 108 of file fd.c.

◆ src_new

struct m0_pdclust_src_addr src_new

Definition at line 109 of file fd.c.

◆ tgt

struct m0_pdclust_tgt_addr tgt

Definition at line 110 of file fd.c.