Motr  M0
fd_tree.c File Reference
#include "fd/fd_internal.h"
#include "lib/assert.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/trace.h"
Include dependency graph for fd_tree.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_FD
 

Functions

M0_INTERNAL int m0_fd__tree_node_init (struct m0_fd_tree *tree, struct m0_fd_tree_node *node, uint16_t child_nr, const struct m0_fd__tree_cursor *cursor)
 
M0_INTERNAL void m0_fd__tree_node_fini (struct m0_fd_tree *tree, struct m0_fd_tree_node *node)
 
M0_INTERNAL int m0_fd__tree_cursor_init (struct m0_fd__tree_cursor *cursor, const struct m0_fd_tree *tree, uint16_t depth)
 
M0_INTERNAL int m0_fd__tree_cursor_init_at (struct m0_fd__tree_cursor *cursor, const struct m0_fd_tree *tree, const struct m0_fd_tree_node *node, uint32_t child_idx)
 
M0_INTERNAL struct m0_fd_tree_node ** m0_fd__tree_cursor_get (struct m0_fd__tree_cursor *cursor)
 
M0_INTERNAL int m0_fd__tree_cursor_next (struct m0_fd__tree_cursor *cursor)
 
M0_INTERNAL int m0_fd__tree_root_create (struct m0_fd_tree *tree, uint64_t root_children)
 
M0_INTERNAL bool m0_fd__tree_invariant (const struct m0_fd_tree *tree)
 
M0_INTERNAL bool m0_fd__tree_node_invariant (const struct m0_fd_tree *tree, const struct m0_fd_tree_node *node)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_FD

Definition at line 27 of file fd_tree.c.

Function Documentation

◆ m0_fd__tree_cursor_get()

M0_INTERNAL struct m0_fd_tree_node** m0_fd__tree_cursor_get ( struct m0_fd__tree_cursor cursor)

Definition at line 136 of file fd_tree.c.

Here is the caller graph for this function:

◆ m0_fd__tree_cursor_init()

M0_INTERNAL int m0_fd__tree_cursor_init ( struct m0_fd__tree_cursor cursor,
const struct m0_fd_tree tree,
uint16_t  depth 
)

Definition at line 62 of file fd_tree.c.

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

◆ m0_fd__tree_cursor_init_at()

M0_INTERNAL int m0_fd__tree_cursor_init_at ( struct m0_fd__tree_cursor cursor,
const struct m0_fd_tree tree,
const struct m0_fd_tree_node node,
uint32_t  child_idx 
)

Definition at line 97 of file fd_tree.c.

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

◆ m0_fd__tree_cursor_next()

M0_INTERNAL int m0_fd__tree_cursor_next ( struct m0_fd__tree_cursor cursor)

Definition at line 142 of file fd_tree.c.

Here is the caller graph for this function:

◆ m0_fd__tree_invariant()

M0_INTERNAL bool m0_fd__tree_invariant ( const struct m0_fd_tree tree)

Definition at line 202 of file fd_tree.c.

Here is the caller graph for this function:

◆ m0_fd__tree_node_fini()

M0_INTERNAL void m0_fd__tree_node_fini ( struct m0_fd_tree tree,
struct m0_fd_tree_node node 
)

Definition at line 53 of file fd_tree.c.

Here is the caller graph for this function:

◆ m0_fd__tree_node_init()

M0_INTERNAL int m0_fd__tree_node_init ( struct m0_fd_tree tree,
struct m0_fd_tree_node node,
uint16_t  child_nr,
const struct m0_fd__tree_cursor cursor 
)

Definition at line 31 of file fd_tree.c.

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

◆ m0_fd__tree_node_invariant()

M0_INTERNAL bool m0_fd__tree_node_invariant ( const struct m0_fd_tree tree,
const struct m0_fd_tree_node node 
)

Definition at line 208 of file fd_tree.c.

Here is the caller graph for this function:

◆ m0_fd__tree_root_create()

M0_INTERNAL int m0_fd__tree_root_create ( struct m0_fd_tree tree,
uint64_t  root_children 
)

Allocates and initializes the root node of the failure domains tree.

Definition at line 181 of file fd_tree.c.

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