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

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_sdev, xd_header)==0)
 
static bool sdev_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_sdev, M0_CONF_SDEV_MAGIC, sdev_check)
 
 M0_CONF__INVARIANT_DEFINE (sdev_invariant, m0_conf_sdev)
 
static int sdev_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int sdev_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool sdev_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static void sdev_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (sdev_create, m0_conf_sdev, &sdev_ops)
 

Variables

static const struct m0_conf_obj_ops sdev_ops
 
const struct m0_conf_obj_type M0_CONF_SDEV_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file sdev.c.

◆ XCAST

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

Definition at line 30 of file sdev.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_sdev, xd_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_sdev  ,
M0_CONF_SDEV_MAGIC  ,
sdev_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( sdev_create  ,
m0_conf_sdev  ,
sdev_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( sdev_invariant  ,
m0_conf_sdev   
)

◆ sdev_check()

static bool sdev_check ( const void *  bob)
static

Definition at line 33 of file sdev.c.

Here is the call graph for this function:

◆ sdev_decode()

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

Definition at line 48 of file sdev.c.

Here is the call graph for this function:

◆ sdev_delete()

static void sdev_delete ( struct m0_conf_obj obj)
static

Definition at line 100 of file sdev.c.

Here is the call graph for this function:

◆ sdev_encode()

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

Definition at line 67 of file sdev.c.

Here is the call graph for this function:

◆ sdev_match()

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

Definition at line 86 of file sdev.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_SDEV_TYPE

const struct m0_conf_obj_type M0_CONF_SDEV_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__SDEV_FT_ID,
.ft_name = "conf_sdev"
},
.cot_create = &sdev_create,
.cot_xt = &m0_confx_sdev_xc,
.cot_branch = "u_sdev",
.cot_xc_init = &m0_xc_m0_confx_sdev_struct_init,
.cot_magic = M0_CONF_SDEV_MAGIC
}

Definition at line 122 of file sdev.c.

◆ sdev_ops

const struct m0_conf_obj_ops sdev_ops
static
Initial value:
= {
.coo_invariant = sdev_invariant,
.coo_decode = sdev_decode,
.coo_encode = sdev_encode,
.coo_match = sdev_match,
.coo_lookup = conf_obj_lookup_denied,
.coo_readdir = NULL,
.coo_downlinks = conf_obj_downlinks_none,
.coo_delete = sdev_delete
}
M0_INTERNAL const struct m0_fid ** conf_obj_downlinks_none(const struct m0_conf_obj *obj)
Definition: common.c:226
#define NULL
Definition: misc.h:38
static void sdev_delete(struct m0_conf_obj *obj)
Definition: sdev.c:100
static int sdev_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: sdev.c:67
M0_INTERNAL int conf_obj_lookup_denied(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: common.c:217
static bool sdev_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: sdev.c:86
static int sdev_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: sdev.c:48

Definition at line 109 of file sdev.c.