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

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_drive, xk_header)==0)
 
static bool drive_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_drive, M0_CONF_DRIVE_MAGIC, drive_check)
 
 M0_CONF__INVARIANT_DEFINE (drive_invariant, m0_conf_drive)
 
static int drive_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int drive_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool drive_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static void drive_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (drive_create, m0_conf_drive, &drive_ops)
 

Variables

static const struct m0_conf_obj_ops drive_ops
 
const struct m0_conf_obj_type M0_CONF_DRIVE_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file drive.c.

◆ XCAST

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

Definition at line 29 of file drive.c.

Function Documentation

◆ drive_check()

static bool drive_check ( const void *  bob)
static

Definition at line 32 of file drive.c.

Here is the call graph for this function:

◆ drive_decode()

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

Definition at line 45 of file drive.c.

Here is the call graph for this function:

◆ drive_delete()

static void drive_delete ( struct m0_conf_obj obj)
static

Definition at line 86 of file drive.c.

Here is the call graph for this function:

◆ drive_encode()

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

Definition at line 64 of file drive.c.

Here is the call graph for this function:

◆ drive_match()

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

Definition at line 77 of file drive.c.

Here is the call graph for this function:

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_drive, xk_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_drive  ,
M0_CONF_DRIVE_MAGIC  ,
drive_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( drive_create  ,
m0_conf_drive  ,
drive_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( drive_invariant  ,
m0_conf_drive   
)

Variable Documentation

◆ drive_ops

const struct m0_conf_obj_ops drive_ops
static
Initial value:
= {
.coo_invariant = drive_invariant,
.coo_decode = drive_decode,
.coo_encode = drive_encode,
.coo_match = drive_match,
.coo_lookup = conf_obj_lookup_denied,
.coo_readdir = NULL,
.coo_downlinks = conf_obj_downlinks_none,
.coo_delete = drive_delete
}
M0_INTERNAL const struct m0_fid ** conf_obj_downlinks_none(const struct m0_conf_obj *obj)
Definition: common.c:226
static int drive_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: drive.c:45
#define NULL
Definition: misc.h:38
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 int drive_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: drive.c:64
static bool drive_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: drive.c:77
static void drive_delete(struct m0_conf_obj *obj)
Definition: drive.c:86

Definition at line 95 of file drive.c.

◆ M0_CONF_DRIVE_TYPE

const struct m0_conf_obj_type M0_CONF_DRIVE_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__DRIVE_FT_ID,
.ft_name = "conf_drive"
},
.cot_create = &drive_create,
.cot_xt = &m0_confx_drive_xc,
.cot_branch = "u_drive",
.cot_xc_init = &m0_xc_m0_confx_drive_struct_init,
.cot_magic = M0_CONF_DRIVE_MAGIC
}

Definition at line 108 of file drive.c.