Motr  M0
Conf_walk

Data Structures

struct  conf_walker
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 

Enumerations

enum  { M0_CW_STOP, M0_CW_CONTINUE, M0_CW_SKIP_SUBTREE, M0_CW_SKIP_SIBLINGS }
 

Functions

static int conf_walker_down (struct conf_walker *w, void *args)
 
static int conf_walker_up (struct conf_walker *w)
 
static struct m0_conf_objconf_downlink_first (const struct m0_conf_obj *obj)
 
static struct m0_conf_objconf_downlink_next (const struct m0_conf_obj *parent, const struct m0_conf_obj *child)
 
M0_INTERNAL int m0_conf_walk (int(*fn)(struct m0_conf_obj *obj, void *args), struct m0_conf_obj *origin, void *args)
 
static void conf_walker_turn (struct conf_walker *w)
 

Detailed Description

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 28 of file walk.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

fn() parameter of m0_conf_walk() should return one of these values. In case of error, negative error code (-Exxx) should be returned.

Enumerator
M0_CW_STOP 

Return immediately.

M0_CW_CONTINUE 

Continue normally.

M0_CW_SKIP_SUBTREE 

Skip the subtree that begins at the current entry. Continue processing with the next sibling.

M0_CW_SKIP_SIBLINGS 

Skip siblings of the current entry. Continue processing in the parent.

Definition at line 37 of file walk.h.

Function Documentation

◆ conf_downlink_first()

static struct m0_conf_obj * conf_downlink_first ( const struct m0_conf_obj obj)
static

Definition at line 127 of file walk.c.

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

◆ conf_downlink_next()

static struct m0_conf_obj * conf_downlink_next ( const struct m0_conf_obj parent,
const struct m0_conf_obj child 
)
static

Definition at line 144 of file walk.c.

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

◆ conf_walker_down()

static int conf_walker_down ( struct conf_walker w,
void *  args 
)
static

Definition at line 76 of file walk.c.

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

◆ conf_walker_turn()

static void conf_walker_turn ( struct conf_walker w)
static

Definition at line 71 of file walk.c.

Here is the caller graph for this function:

◆ conf_walker_up()

static int conf_walker_up ( struct conf_walker w)
static

Definition at line 108 of file walk.c.

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

◆ m0_conf_walk()

M0_INTERNAL int m0_conf_walk ( int(*)(struct m0_conf_obj *obj, void *args fn,
struct m0_conf_obj origin,
void *  args 
)

Performs depth-first traversal of the tree of conf objects, starting from ‘origin’, and calls fn() once for each conf object in the tree.

fn() should return one of M0_CW_* values (see enum above), or -Exxx in case of error.

Precondition
m0_conf_cache_is_locked(origin->co_cache)

Definition at line 49 of file walk.c.

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