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

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_rack, xr_header)==0)
 
static bool rack_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_rack, M0_CONF_RACK_MAGIC, rack_check)
 
 M0_CONF__INVARIANT_DEFINE (rack_invariant, m0_conf_rack)
 
static int rack_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int rack_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool rack_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int rack_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** rack_downlinks (const struct m0_conf_obj *obj)
 
static void rack_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (rack_create, m0_conf_rack, &rack_ops)
 

Variables

static const struct m0_conf_obj_ops rack_ops
 
const struct m0_conf_obj_type M0_CONF_RACK_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file rack.c.

◆ XCAST

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

Definition at line 29 of file rack.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_rack, xr_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_rack  ,
M0_CONF_RACK_MAGIC  ,
rack_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( rack_create  ,
m0_conf_rack  ,
rack_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( rack_invariant  ,
m0_conf_rack   
)

◆ rack_check()

static bool rack_check ( const void *  bob)
static

Definition at line 32 of file rack.c.

Here is the call graph for this function:

◆ rack_decode()

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

Definition at line 45 of file rack.c.

Here is the call graph for this function:

◆ rack_delete()

static void rack_delete ( struct m0_conf_obj obj)
static

Definition at line 103 of file rack.c.

Here is the call graph for this function:

◆ rack_downlinks()

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

Definition at line 96 of file rack.c.

Here is the call graph for this function:

◆ rack_encode()

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

Definition at line 60 of file rack.c.

Here is the call graph for this function:

◆ rack_lookup()

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

Definition at line 84 of file rack.c.

Here is the call graph for this function:

◆ rack_match()

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

Definition at line 76 of file rack.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_RACK_TYPE

const struct m0_conf_obj_type M0_CONF_RACK_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__RACK_FT_ID,
.ft_name = "conf_rack"
},
.cot_create = &rack_create,
.cot_xt = &m0_confx_rack_xc,
.cot_branch = "u_rack",
.cot_xc_init = &m0_xc_m0_confx_rack_struct_init,
.cot_magic = M0_CONF_RACK_MAGIC
}

Definition at line 124 of file rack.c.

◆ rack_ops

const struct m0_conf_obj_ops rack_ops
static
Initial value:
= {
.coo_invariant = rack_invariant,
.coo_decode = rack_decode,
.coo_encode = rack_encode,
.coo_match = rack_match,
.coo_lookup = rack_lookup,
.coo_readdir = NULL,
.coo_downlinks = rack_downlinks,
.coo_delete = rack_delete
}
static int rack_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: rack.c:84
static void rack_delete(struct m0_conf_obj *obj)
Definition: rack.c:103
#define NULL
Definition: misc.h:38
static bool rack_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: rack.c:76
static int rack_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: rack.c:45
static int rack_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: rack.c:60
static const struct m0_fid ** rack_downlinks(const struct m0_conf_obj *obj)
Definition: rack.c:96

Definition at line 111 of file rack.c.