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

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_pver, xv_header)==0)
 
static bool pver_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_pver, M0_CONF_PVER_MAGIC, pver_check)
 
 M0_CONF__INVARIANT_DEFINE (pver_invariant, m0_conf_pver)
 
static int pver_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int pver_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool pver_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int pver_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** pver_downlinks (const struct m0_conf_obj *obj)
 
static void pver_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (pver_create, m0_conf_pver, &pver_ops)
 

Variables

static const struct m0_conf_obj_ops pver_ops
 
const struct m0_conf_obj_type M0_CONF_PVER_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file pver.c.

◆ XCAST

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

Definition at line 31 of file pver.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_pver, xv_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_pver  ,
M0_CONF_PVER_MAGIC  ,
pver_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( pver_create  ,
m0_conf_pver  ,
pver_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( pver_invariant  ,
m0_conf_pver   
)

◆ pver_check()

static bool pver_check ( const void *  bob)
static

Definition at line 34 of file pver.c.

Here is the call graph for this function:

◆ pver_decode()

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

Definition at line 58 of file pver.c.

Here is the call graph for this function:

◆ pver_delete()

static void pver_delete ( struct m0_conf_obj obj)
static

Definition at line 239 of file pver.c.

Here is the call graph for this function:

◆ pver_downlinks()

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

Definition at line 228 of file pver.c.

◆ pver_encode()

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

Definition at line 114 of file pver.c.

Here is the call graph for this function:

◆ pver_lookup()

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

Definition at line 199 of file pver.c.

Here is the call graph for this function:

◆ pver_match()

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

Definition at line 160 of file pver.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_PVER_TYPE

const struct m0_conf_obj_type M0_CONF_PVER_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__PVER_FT_ID,
.ft_name = "conf_pver"
},
.cot_create = &pver_create,
.cot_xt = &m0_confx_pver_xc,
.cot_branch = "u_pver",
.cot_xc_init = &m0_xc_m0_confx_pver_struct_init,
.cot_magic = M0_CONF_PVER_MAGIC
}

Definition at line 260 of file pver.c.

◆ pver_ops

const struct m0_conf_obj_ops pver_ops
static
Initial value:
= {
.coo_invariant = pver_invariant,
.coo_decode = pver_decode,
.coo_encode = pver_encode,
.coo_match = pver_match,
.coo_lookup = pver_lookup,
.coo_readdir = NULL,
.coo_downlinks = pver_downlinks,
.coo_delete = pver_delete
}
#define NULL
Definition: misc.h:38
static bool pver_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: pver.c:160
static int pver_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: pver.c:114
static void pver_delete(struct m0_conf_obj *obj)
Definition: pver.c:239
static int pver_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: pver.c:199
static int pver_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: pver.c:58
static const struct m0_fid ** pver_downlinks(const struct m0_conf_obj *obj)
Definition: pver.c:228

Definition at line 247 of file pver.c.