23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 70 m0_conf_cache_tlist_init(&
cache->ca_registry);
73 cache->ca_fid_counter = 0;
90 m0_conf_cache_tlist_add(&
cache->ca_registry,
obj);
117 m0_conf_cache_tlist_del(
obj);
160 if (
gc && !
obj->co_deleted)
189 m0_conf_cache_tlist_fini(&
cache->ca_registry);
328 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
static struct m0_mutex lock
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_pinned(const struct m0_conf_cache *cache)
M0_INTERNAL void m0_confx_free(struct m0_confx *enc)
static struct cgc_context gc
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_lookup(const struct m0_conf_cache *cache, const struct m0_fid *id)
#define M0_LOG(level,...)
static void conf_cache_clean(struct m0_conf_cache *cache, const struct m0_conf_obj_type *type, bool gc)
#define M0_CONFX_AT(cx, idx)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_conf_obj_fill(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
M0_TL_DEFINE(m0_conf_cache, M0_INTERNAL, struct m0_conf_obj)
#define M0_ERR_INFO(rc, fmt,...)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL int m0_conf_cache_to_string(struct m0_conf_cache *cache, char **str, bool debug)
M0_INTERNAL bool m0_mutex_is_locked(const struct m0_mutex *mutex)
M0_INTERNAL int m0_confx_to_string(struct m0_confx *confx, char **out)
M0_INTERNAL void m0_conf_cache_init(struct m0_conf_cache *cache, struct m0_mutex *lock)
M0_TL_DESCR_DEFINE(m0_conf_cache, "registered m0_conf_obj-s",, struct m0_conf_obj, co_cache_link, co_gen_magic, M0_CONF_OBJ_MAGIC, M0_CONF_CACHE_MAGIC)
M0_INTERNAL bool m0_conf_cache_is_locked(const struct m0_conf_cache *cache)
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)
M0_INTERNAL int m0_conf_cache_add(struct m0_conf_cache *cache, struct m0_conf_obj *obj)
M0_INTERNAL size_t m0_confx_sizeof(void)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
static int conf_cache_encode(const struct m0_conf_cache *cache, struct m0_confx *dest, bool debug)
M0_INTERNAL int m0_confstr_parse(const char *str, struct m0_confx **out)
M0_INTERNAL void m0_conf_cache_del(const struct m0_conf_cache *cache, struct m0_conf_obj *obj)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL int m0_conf_cache_from_string(struct m0_conf_cache *cache, const char *str)
const struct m0_fid M0_CONF_ROOT_FID
M0_INTERNAL int m0_conf_version(struct m0_conf_cache *cache)
M0_INTERNAL void m0_conf_obj_delete(struct m0_conf_obj *obj)
M0_INTERNAL void m0_conf_cache_clean(struct m0_conf_cache *cache, const struct m0_conf_obj_type *type)
M0_INTERNAL void m0_conf_cache_gc(struct m0_conf_cache *cache)
M0_INTERNAL bool m0_conf_cache_contains(struct m0_conf_cache *cache, const struct m0_fid *fid)
M0_INTERNAL void m0_conf_cache_fini(struct m0_conf_cache *cache)
M0_INTERNAL void m0_conf_cache_lock(struct m0_conf_cache *cache)
static int scan(struct scanner *s)
#define m0_tl_find(name, var, head,...)
const struct m0_conf_obj_type M0_CONF_DIR_TYPE
#define m0_tl_for(name, head, obj)
static void _obj_del(struct m0_conf_obj *obj)
M0_INTERNAL void m0_conf_cache_unlock(struct m0_conf_cache *cache)
M0_INTERNAL bool m0_conf_obj_invariant(const struct m0_conf_obj *obj)
static int conf_encode(struct m0_confx *enc, const struct m0_conf_obj *obj, bool debug)
const struct m0_fid * m0_conf_objx_fid(const struct m0_confx_obj *obj)
#define m0_tl_forall(name, var, head,...)