22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 26 #include "conf/onwire_xc.h" 29 #define XCAST(xobj) ((struct m0_confx_enclosure *)(&(xobj)->xo_u)) 64 &
s->xe_ctrls),
dest) ?:
79 if (
s->ce_node !=
NULL)
80 d->
xe_node =
s->ce_node->cn_obj.co_id;
104 { e->
ce_ctrls, &M0_CONF_ENCLOSURE_CTRLS_FID }
113 static const struct m0_fid *rels[] = { &M0_CONF_ENCLOSURE_CTRLS_FID,
122 m0_conf_enclosure_bob_fini(
x);
142 .
ft_id = M0_CONF__ENCLOSURE_FT_ID,
143 .ft_name =
"conf_enclosure" 145 .cot_create = &enclosure_create,
146 .cot_xt = &m0_confx_enclosure_xc,
147 .cot_branch =
"u_enclosure",
148 .cot_xc_init = &m0_xc_m0_confx_enclosure_struct_init,
153 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
M0_INTERNAL int conf_dirs_encode(const struct conf_dir_encoding_pair *how, size_t how_nr)
M0_INTERNAL int conf_dirs_lookup(struct m0_conf_obj **out, const struct m0_fid *name, const struct conf_dir_relation *rels, size_t nr_rels)
#define CONF_DIR_ENTRIES(relfid, entry_type, entries)
static int enclosure_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
bool(* coo_invariant)(const struct m0_conf_obj *obj)
struct m0_conf_pver ** ce_pvers
struct m0_fid_arr xe_pvers
static int enclosure_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
struct m0_confx_header xe_header
const struct m0_conf_obj_type M0_CONF_CONTROLLER_TYPE
struct m0_conf_dir * ce_ctrls
M0_BASSERT(offsetof(struct m0_confx_enclosure, xe_header)==0)
M0_INTERNAL int conf_pvers_decode(struct m0_conf_pver ***dest, const struct m0_fid_arr *src, struct m0_conf_cache *cache)
return M0_ERR(-EOPNOTSUPP)
static bool enclosure_check(const void *bob)
const struct m0_conf_obj_type M0_CONF_ENCLOSURE_TYPE
const struct m0_fid_type cot_ftype
M0_INTERNAL int conf_pvers_encode(struct m0_fid_arr *dest, const struct m0_conf_pver **src)
static const struct m0_fid ** enclosure_downlinks(const struct m0_conf_obj *obj)
struct m0_fid_arr xe_ctrls
static bool enclosure_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
M0_INTERNAL void confx_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
M0_INTERNAL int m0_conf_obj_find(struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out)
#define M0_CONF_CAST(ptr, type)
struct m0_conf_node * ce_node
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
static int enclosure_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
M0_CONF__BOB_DEFINE(m0_conf_enclosure, M0_CONF_ENCLOSURE_MAGIC, enclosure_check)
static const struct m0_conf_obj_ops enclosure_ops
M0_CONF__CTOR_DEFINE(enclosure_create, m0_conf_enclosure, &enclosure_ops)
enum m0_conf_status co_status
M0_CONF_REL_FIDS M0_INTERNAL int dir_create_and_populate(struct m0_conf_dir **result, const struct conf_dir_entries *de, struct m0_conf_obj *dir_parent)
static struct m0_addb2_source * s
M0_CONF__INVARIANT_DEFINE(enclosure_invariant, m0_conf_enclosure)
M0_INTERNAL bool m0_conf_dir_elems_match(const struct m0_conf_dir *dir, const struct m0_fid_arr *fids)
struct m0_pdclust_src_addr src
#define offsetof(typ, memb)
static void enclosure_delete(struct m0_conf_obj *obj)