28 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 49 m0_conf_dir_tlist_add_tail(&
dir->cd_items,
obj);
60 m0_conf_dir_tlist_del(
obj);
68 return m0_conf_dir_tlist_length(&
dir->cd_items) ==
fids->af_count &&
86 out->f_container &= ~0x00ffff0000000000ULL;
94 const struct m0_fid *parent,
95 const struct m0_fid *relfid,
122 dir->cd_item_type = children_type;
123 dir->cd_relfid = *relfid;
125 if (children_ids !=
NULL) {
131 if (m0_conf_dir_tlist_contains(&
dir->cd_items, child)) {
133 -EEXIST,
FID_F": Directory element " 149 if (children_ids !=
NULL) {
160 const struct m0_fid *relfid,
168 children_type, children_ids,
out);
174 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
M0_TL_DEFINE(m0_conf_dir, M0_INTERNAL, struct m0_conf_obj)
const struct m0_fid_type M0_CONF_RELFID_TYPE
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_lookup(const struct m0_conf_cache *cache, const struct m0_fid *id)
M0_INTERNAL void m0_conf_dir_add(struct m0_conf_dir *dir, struct m0_conf_obj *obj)
const struct m0_conf_obj_type * m0_conf_fid_type(const struct m0_fid *fid)
static int conf_dir_new(struct m0_conf_cache *cache, const struct m0_fid *parent, const struct m0_fid *relfid, const struct m0_conf_obj_type *children_type, const struct m0_fid_arr *children_ids, struct m0_conf_dir **out)
struct m0_conf_cache * co_cache
M0_TL_DESCR_DEFINE(m0_conf_dir, "m0_conf_dir::cd_items", M0_INTERNAL, struct m0_conf_obj, co_dir_link, co_gen_magic, M0_CONF_OBJ_MAGIC, M0_CONF_DIR_MAGIC)
M0_INTERNAL int m0_conf_dir_new(struct m0_conf_obj *parent, const struct m0_fid *relfid, const struct m0_conf_obj_type *children_type, const struct m0_fid_arr *children_ids, struct m0_conf_dir **out)
#define M0_ERR_INFO(rc, fmt,...)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_conf_child_adopt(struct m0_conf_obj *parent, struct m0_conf_obj *child)
#define m0_tl_teardown(name, head, obj)
const struct m0_fid_type cot_ftype
M0_INTERNAL const struct m0_fid_type * m0_fid_type_getfid(const struct m0_fid *fid)
M0_INTERNAL int m0_conf_obj_find(struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out)
static const struct m0_fid fids[]
#define M0_CONF_CAST(ptr, type)
M0_INTERNAL int m0_conf_cache_add(struct m0_conf_cache *cache, struct m0_conf_obj *obj)
static void conf_dir_id_build(struct m0_fid *out, const struct m0_fid *parent, const struct m0_conf_obj_type *children_type)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
#define m0_forall(var, nr,...)
M0_INTERNAL struct m0_conf_obj * m0_conf_obj_create(const struct m0_fid *id, struct m0_conf_cache *cache)
M0_INTERNAL void m0_conf_cache_del(const struct m0_conf_cache *cache, struct m0_conf_obj *obj)
M0_INTERNAL void m0_conf_obj_delete(struct m0_conf_obj *obj)
enum m0_conf_status co_status
M0_INTERNAL void m0_conf_dir_del(struct m0_conf_dir *dir, struct m0_conf_obj *obj)
const struct m0_conf_obj_type M0_CONF_DIR_TYPE
M0_INTERNAL bool m0_conf_dir_elems_match(const struct m0_conf_dir *dir, const struct m0_fid_arr *fids)
M0_INTERNAL bool m0_conf_obj_invariant(const struct m0_conf_obj *obj)
#define m0_tl_forall(name, var, head,...)
M0_INTERNAL void m0_fid_tassume(struct m0_fid *fid, const struct m0_fid_type *ft)