Motr  M0
enclosure.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 enclosure.c:

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_enclosure, xe_header)==0)
 
static bool enclosure_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_enclosure, M0_CONF_ENCLOSURE_MAGIC, enclosure_check)
 
 M0_CONF__INVARIANT_DEFINE (enclosure_invariant, m0_conf_enclosure)
 
static int enclosure_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int enclosure_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool enclosure_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int enclosure_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** enclosure_downlinks (const struct m0_conf_obj *obj)
 
static void enclosure_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (enclosure_create, m0_conf_enclosure, &enclosure_ops)
 

Variables

static const struct m0_conf_obj_ops enclosure_ops
 
const struct m0_conf_obj_type M0_CONF_ENCLOSURE_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file enclosure.c.

◆ XCAST

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

Definition at line 29 of file enclosure.c.

Function Documentation

◆ enclosure_check()

static bool enclosure_check ( const void *  bob)
static

Definition at line 32 of file enclosure.c.

Here is the call graph for this function:

◆ enclosure_decode()

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

Definition at line 46 of file enclosure.c.

Here is the call graph for this function:

◆ enclosure_delete()

static void enclosure_delete ( struct m0_conf_obj obj)
static

Definition at line 119 of file enclosure.c.

Here is the call graph for this function:

◆ enclosure_downlinks()

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

Definition at line 111 of file enclosure.c.

Here is the call graph for this function:

◆ enclosure_encode()

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

Definition at line 70 of file enclosure.c.

Here is the call graph for this function:

◆ enclosure_lookup()

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

Definition at line 99 of file enclosure.c.

Here is the call graph for this function:

◆ enclosure_match()

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

Definition at line 88 of file enclosure.c.

Here is the call graph for this function:

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_enclosure, xe_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_enclosure  ,
M0_CONF_ENCLOSURE_MAGIC  ,
enclosure_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( enclosure_create  ,
m0_conf_enclosure  ,
enclosure_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( enclosure_invariant  ,
m0_conf_enclosure   
)

Variable Documentation

◆ enclosure_ops

const struct m0_conf_obj_ops enclosure_ops
static
Initial value:
= {
.coo_invariant = enclosure_invariant,
.coo_decode = enclosure_decode,
.coo_encode = enclosure_encode,
.coo_match = enclosure_match,
.coo_lookup = enclosure_lookup,
.coo_readdir = NULL,
.coo_downlinks = enclosure_downlinks,
.coo_delete = enclosure_delete,
}
#define NULL
Definition: misc.h:38
static int enclosure_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: enclosure.c:70
static int enclosure_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: enclosure.c:99
static const struct m0_fid ** enclosure_downlinks(const struct m0_conf_obj *obj)
Definition: enclosure.c:111
static bool enclosure_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: enclosure.c:88
static int enclosure_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: enclosure.c:46
static void enclosure_delete(struct m0_conf_obj *obj)
Definition: enclosure.c:119

Definition at line 127 of file enclosure.c.

◆ M0_CONF_ENCLOSURE_TYPE

const struct m0_conf_obj_type M0_CONF_ENCLOSURE_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__ENCLOSURE_FT_ID,
.ft_name = "conf_enclosure"
},
.cot_create = &enclosure_create,
.cot_xt = &m0_confx_enclosure_xc,
.cot_branch = "u_enclosure",
.cot_xc_init = &m0_xc_m0_confx_enclosure_struct_init,
}

Definition at line 140 of file enclosure.c.