Motr  M0
Configuration directory iterator

Data Structures

struct  m0_conf_diter_lvl_ctx
 
struct  m0_conf_diter_lvl
 
struct  m0_conf_diter
 

Macros

#define m0_conf_diter_init(iter, confc, origin, ...)
 

Enumerations

enum  diter_phase { DPH_LVL_OPEN, DPH_LVL_READ, DPH_LVL_WAIT }
 
enum  m0_diter_lvl_mode { M0_DLM_DIR, M0_DLM_ENTRY, M0_DLM_NR }
 

Functions

static bool diter_lvl_invariant (const struct m0_conf_diter_lvl *l)
 
static bool diter_invariant (const struct m0_conf_diter *it)
 
M0_INTERNAL void m0_conf_diter_lvl_init (struct m0_conf_diter_lvl *l, struct m0_conf_diter *it, struct m0_confc *confc, uint32_t lvl, const struct m0_fid *path)
 
static void diter_confc_ctx_fini (struct m0_conf_diter *it, struct m0_confc_ctx *ctx)
 
M0_INTERNAL void m0_conf_diter_lvl_fini (struct m0_conf_diter_lvl *l)
 
static struct m0_conf_objditer_lvl_dir_obj (struct m0_conf_diter_lvl *l)
 
static struct m0_conf_objditer_lvl_entry_obj (struct m0_conf_diter_lvl *l)
 
static struct m0_confc_ctxditer_lvl_ctx (struct m0_conf_diter_lvl *l)
 
static struct m0_conf_diter_lvlditer_lvl (struct m0_conf_diter *it)
 
static void diter_lvl_mode_set (struct m0_conf_diter_lvl *l, enum m0_diter_lvl_mode mode)
 
static bool diter_chan_cb (struct m0_clink *link)
 
M0_INTERNAL int m0_conf__diter_init (struct m0_conf_diter *it, struct m0_confc *confc, struct m0_conf_obj *origin, uint32_t nr_lvls, const struct m0_fid *path)
 
M0_INTERNAL void m0_conf_diter_fini (struct m0_conf_diter *it)
 
M0_INTERNAL void m0_conf_diter_locked_set (struct m0_conf_diter *it, bool locked)
 
M0_INTERNAL void m0_conf_diter_wait_arm (struct m0_conf_diter *it, struct m0_clink *clink)
 
static void diter_wait_arm (struct m0_conf_diter *it, struct m0_confc_ctx *ctx)
 
static void diter_wait_cancel (struct m0_clink *clink, bool locked)
 
static void diter_lvl_result_set (struct m0_conf_diter_lvl *l, struct m0_conf_obj *result)
 
static struct m0_conf_objditer_lvl_origin (struct m0_conf_diter *it)
 
static int diter_wait (struct m0_conf_diter *it)
 
static void diter_lvl_check (struct m0_conf_diter *it)
 
M0_INTERNAL int diter_lvl_open (struct m0_conf_diter *it)
 
static int diter_lvl_read (struct m0_conf_diter *it)
 
M0_INTERNAL int m0_conf_diter_next (struct m0_conf_diter *it, bool(*filter)(const struct m0_conf_obj *obj))
 
M0_INTERNAL int m0_conf_diter_next_sync (struct m0_conf_diter *it, bool(*filter)(const struct m0_conf_obj *obj))
 
M0_INTERNAL struct m0_conf_objm0_conf_diter_result (const struct m0_conf_diter *it)
 

Detailed Description

Macro Definition Documentation

◆ m0_conf_diter_init

#define m0_conf_diter_init (   iter,
  confc,
  origin,
  ... 
)
Value:
m0_conf__diter_init(iter, confc, origin, \
M0_COUNT_PARAMS(__VA_ARGS__) + 1, \
(const struct m0_fid []){ \
__VA_ARGS__, M0_FID0 })
#define M0_COUNT_PARAMS(...)
Definition: misc.h:370
static struct m0_confc * confc
Definition: file.c:94
Definition: fid.h:38
#define M0_FID0
Definition: fid.h:93
M0_INTERNAL int m0_conf__diter_init(struct m0_conf_diter *it, struct m0_confc *confc, struct m0_conf_obj *origin, uint32_t nr_lvls, const struct m0_fid *path)
Definition: diter.c:282

Initialises configuration directory iterator with the given configuration path.

Precondition
origin->co_status == M0_CS_READY

Definition at line 235 of file diter.h.

Enumeration Type Documentation

◆ diter_phase

Enumerator
DPH_LVL_OPEN 
DPH_LVL_READ 
DPH_LVL_WAIT 

Definition at line 185 of file diter.c.

◆ m0_diter_lvl_mode

Enumerator
M0_DLM_DIR 
M0_DLM_ENTRY 
M0_DLM_NR 

Definition at line 144 of file diter.h.

Function Documentation

◆ diter_chan_cb()

static bool diter_chan_cb ( struct m0_clink link)
static

Definition at line 269 of file diter.c.

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

◆ diter_confc_ctx_fini()

static void diter_confc_ctx_fini ( struct m0_conf_diter it,
struct m0_confc_ctx ctx 
)
static

Definition at line 220 of file diter.c.

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

◆ diter_invariant()

static bool diter_invariant ( const struct m0_conf_diter it)
static

Definition at line 198 of file diter.c.

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

◆ diter_lvl()

static struct m0_conf_diter_lvl* diter_lvl ( struct m0_conf_diter it)
inlinestatic

Definition at line 258 of file diter.c.

Here is the caller graph for this function:

◆ diter_lvl_check()

static void diter_lvl_check ( struct m0_conf_diter it)
static

Definition at line 430 of file diter.c.

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

◆ diter_lvl_ctx()

static struct m0_confc_ctx* diter_lvl_ctx ( struct m0_conf_diter_lvl l)
inlinestatic

Definition at line 253 of file diter.c.

Here is the caller graph for this function:

◆ diter_lvl_dir_obj()

static struct m0_conf_obj* diter_lvl_dir_obj ( struct m0_conf_diter_lvl l)
inlinestatic

Definition at line 242 of file diter.c.

Here is the caller graph for this function:

◆ diter_lvl_entry_obj()

static struct m0_conf_obj* diter_lvl_entry_obj ( struct m0_conf_diter_lvl l)
inlinestatic

Definition at line 248 of file diter.c.

Here is the caller graph for this function:

◆ diter_lvl_invariant()

static bool diter_lvl_invariant ( const struct m0_conf_diter_lvl l)
static

Definition at line 191 of file diter.c.

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

◆ diter_lvl_mode_set()

static void diter_lvl_mode_set ( struct m0_conf_diter_lvl l,
enum m0_diter_lvl_mode  mode 
)
inlinestatic

Definition at line 263 of file diter.c.

Here is the caller graph for this function:

◆ diter_lvl_open()

M0_INTERNAL int diter_lvl_open ( struct m0_conf_diter it)

Definition at line 443 of file diter.c.

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

◆ diter_lvl_origin()

static struct m0_conf_obj* diter_lvl_origin ( struct m0_conf_diter it)
static

Definition at line 367 of file diter.c.

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

◆ diter_lvl_read()

static int diter_lvl_read ( struct m0_conf_diter it)
static

Definition at line 466 of file diter.c.

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

◆ diter_lvl_result_set()

static void diter_lvl_result_set ( struct m0_conf_diter_lvl l,
struct m0_conf_obj result 
)
static

Definition at line 361 of file diter.c.

Here is the caller graph for this function:

◆ diter_wait()

static int diter_wait ( struct m0_conf_diter it)
static

Definition at line 395 of file diter.c.

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

◆ diter_wait_arm()

static void diter_wait_arm ( struct m0_conf_diter it,
struct m0_confc_ctx ctx 
)
static

Definition at line 345 of file diter.c.

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

◆ diter_wait_cancel()

static void diter_wait_cancel ( struct m0_clink clink,
bool  locked 
)
static

Definition at line 353 of file diter.c.

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

◆ m0_conf__diter_init()

M0_INTERNAL int m0_conf__diter_init ( struct m0_conf_diter it,
struct m0_confc confc,
struct m0_conf_obj origin,
uint32_t  nr_lvls,
const struct m0_fid path 
)

Definition at line 282 of file diter.c.

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

◆ m0_conf_diter_fini()

M0_INTERNAL void m0_conf_diter_fini ( struct m0_conf_diter it)

Definition at line 313 of file diter.c.

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

◆ m0_conf_diter_locked_set()

M0_INTERNAL void m0_conf_diter_locked_set ( struct m0_conf_diter it,
bool  locked 
)
See also
m0_conf_diter::di_locked

Definition at line 331 of file diter.c.

◆ m0_conf_diter_lvl_fini()

M0_INTERNAL void m0_conf_diter_lvl_fini ( struct m0_conf_diter_lvl l)

Definition at line 229 of file diter.c.

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

◆ m0_conf_diter_lvl_init()

M0_INTERNAL void m0_conf_diter_lvl_init ( struct m0_conf_diter_lvl l,
struct m0_conf_diter it,
struct m0_confc confc,
uint32_t  lvl,
const struct m0_fid path 
)

Definition at line 210 of file diter.c.

Here is the caller graph for this function:

◆ m0_conf_diter_next()

M0_INTERNAL int m0_conf_diter_next ( struct m0_conf_diter it,
bool(*)(const struct m0_conf_obj *obj filter 
)

Returns next struct m0_conf_obj in the given configuration path using the given filter. Result of an iteration must be accessed using m0_conf_diter_result().

Return values
M0_CONF_DIRNEXT
See also
m0_confc_readdir()
Return values
M0_CONF_DIRMISS
See also
m0_confc_readdir()
Return values
-ENODATAThere are no more directory objects to traverse.

Definition at line 532 of file diter.c.

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

◆ m0_conf_diter_next_sync()

M0_INTERNAL int m0_conf_diter_next_sync ( struct m0_conf_diter it,
bool(*)(const struct m0_conf_obj *obj filter 
)

Definition at line 555 of file diter.c.

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

◆ m0_conf_diter_result()

M0_INTERNAL struct m0_conf_obj * m0_conf_diter_result ( const struct m0_conf_diter it)

Definition at line 576 of file diter.c.

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

◆ m0_conf_diter_wait_arm()

M0_INTERNAL void m0_conf_diter_wait_arm ( struct m0_conf_diter it,
struct m0_clink clink 
)

Registers given with m0_conf_diter::di_wait channel.

Definition at line 337 of file diter.c.

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