Motr  M0
pool.c File Reference
#include "lib/trace.h"
#include "conf/objs/common.h"
#include "conf/onwire_xc.h"
#include "motr/magic.h"
#include "fid/fid.h"
Include dependency graph for pool.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 
#define XCAST(xobj)   ((struct m0_confx_pool *)(&(xobj)->xo_u))
 

Functions

 M0_BASSERT (offsetof(struct m0_confx_pool, xp_header)==0)
 
static bool pool_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_pool, M0_CONF_POOL_MAGIC, pool_check)
 
 M0_CONF__INVARIANT_DEFINE (pool_invariant, m0_conf_pool)
 
static int pool_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int pool_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool pool_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int pool_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** pool_downlinks (const struct m0_conf_obj *obj)
 
static void pool_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (pool_create, m0_conf_pool, &pool_ops)
 

Variables

static const struct m0_conf_obj_ops pool_ops
 
const struct m0_conf_obj_type M0_CONF_POOL_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file pool.c.

◆ XCAST

#define XCAST (   xobj)    ((struct m0_confx_pool *)(&(xobj)->xo_u))

Definition at line 160 of file pool.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_pool, xp_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_pool  ,
M0_CONF_POOL_MAGIC  ,
pool_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( pool_create  ,
m0_conf_pool  ,
pool_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( pool_invariant  ,
m0_conf_pool   
)

◆ pool_check()

static bool pool_check ( const void *  bob)
static

Definition at line 163 of file pool.c.

Here is the call graph for this function:

◆ pool_decode()

static int pool_decode ( struct m0_conf_obj dest,
const struct m0_confx_obj src 
)
static

Definition at line 175 of file pool.c.

Here is the call graph for this function:

◆ pool_delete()

static void pool_delete ( struct m0_conf_obj obj)
static

Definition at line 228 of file pool.c.

Here is the call graph for this function:

◆ pool_downlinks()

static const struct m0_fid** pool_downlinks ( const struct m0_conf_obj obj)
static

Definition at line 220 of file pool.c.

Here is the call graph for this function:

◆ pool_encode()

static int pool_encode ( struct m0_confx_obj dest,
const struct m0_conf_obj src 
)
static

Definition at line 188 of file pool.c.

Here is the call graph for this function:

◆ pool_lookup()

static int pool_lookup ( const struct m0_conf_obj parent,
const struct m0_fid name,
struct m0_conf_obj **  out 
)
static

Definition at line 208 of file pool.c.

Here is the call graph for this function:

◆ pool_match()

static bool pool_match ( const struct m0_conf_obj cached,
const struct m0_confx_obj flat 
)
static

Definition at line 199 of file pool.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_POOL_TYPE

const struct m0_conf_obj_type M0_CONF_POOL_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__POOL_FT_ID,
.ft_name = "conf_pool"
},
.cot_create = &pool_create,
.cot_xt = &m0_confx_pool_xc,
.cot_branch = "u_pool",
.cot_xc_init = &m0_xc_m0_confx_pool_struct_init,
.cot_magic = M0_CONF_POOL_MAGIC
}

Definition at line 249 of file pool.c.

◆ pool_ops

const struct m0_conf_obj_ops pool_ops
static
Initial value:
= {
.coo_invariant = pool_invariant,
.coo_decode = pool_decode,
.coo_encode = pool_encode,
.coo_match = pool_match,
.coo_lookup = pool_lookup,
.coo_readdir = NULL,
.coo_downlinks = pool_downlinks,
.coo_delete = pool_delete
}
#define NULL
Definition: misc.h:38
static int pool_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: pool.c:175
static void pool_delete(struct m0_conf_obj *obj)
Definition: pool.c:228
static int pool_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: pool.c:188
static bool pool_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: pool.c:199
static int pool_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: pool.c:208
static const struct m0_fid ** pool_downlinks(const struct m0_conf_obj *obj)
Definition: pool.c:220

Definition at line 236 of file pool.c.