22 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 457 .rst_typecode = M0_CST_CONFD,
549 char *confstr =
NULL;
605 FID_F" is not part of configuration tree.",
621 return s ==
NULL || *
s ==
'\0';
639 if (**dbpath ==
'\0')
645 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
static bool nil(const char *s)
M0_INTERNAL bool m0_buf_is_set(const struct m0_buf *buf)
M0_INTERNAL void m0_confx_free(struct m0_confx *enc)
int(* rso_start)(struct m0_reqh_service *service)
M0_INTERNAL int m0_file_read(const char *path, char **out)
struct m0_reqh_service d_reqh
static void confd_stop(struct m0_reqh_service *service)
const struct m0_conf_obj_type M0_CONF_ROOT_TYPE
#define M0_CONFX_AT(cx, idx)
int m0_reqh_service_type_register(struct m0_reqh_service_type *rstype)
M0_INTERNAL int m0_confd_register(void)
struct m0_mutex d_cache_lock
struct m0_reqh_service_type m0_confd_stype
M0_INTERNAL void m0_confd_unregister(void)
struct m0_buf rs_ss_param
M0_INTERNAL int m0_conf_obj_fill(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
M0_INTERNAL int m0_confd_service_to_filename(struct m0_reqh_service *service, char **dbpath)
static const struct m0_reqh_service_ops confd_ops
M0_INTERNAL void m0_bob_init(const struct m0_bob_type *bt, void *bob)
return M0_ERR(-EOPNOTSUPP)
static const struct socktype stype[]
static int confd_start(struct m0_reqh_service *service)
M0_INTERNAL bool m0_mutex_is_locked(const struct m0_mutex *mutex)
const struct m0_bob_type m0_confd_bob
#define bob_of(ptr, type, field, bt)
M0_INTERNAL void m0_bob_fini(const struct m0_bob_type *bt, void *bob)
struct m0_reqh_context * rs_reqh_ctx
M0_INTERNAL int m0_confd_cache_create(struct m0_conf_cache **out, struct m0_mutex *cache_lock, const char *confstr)
M0_INTERNAL void m0_conf_cache_init(struct m0_conf_cache *cache, struct m0_mutex *lock)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL void m0_confd_cache_destroy(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)
static int confd_cache_preload(struct m0_conf_cache *cache, const char *str)
static const struct m0_reqh_service_type_ops confd_stype_ops
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
struct m0_conf_cache * d_cache
M0_INTERNAL bool m0_tlink_is_in(const struct m0_tl_descr *d, const void *obj)
static void confd_fini(struct m0_reqh_service *service)
M0_INTERNAL char * m0_buf_strdup(const struct m0_buf *buf)
#define M0_MAGIX_OFFSET(type, field)
int(* rsto_service_allocate)(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
M0_INTERNAL int m0_confstr_parse(const char *str, struct m0_confx **out)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
#define M0_ASSERT_INFO(cond, fmt,...)
static int confd_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
M0_INTERNAL void m0_conf_cache_fini(struct m0_conf_cache *cache)
M0_INTERNAL void m0_conf_cache_lock(struct m0_conf_cache *cache)
#define m0_tl_for(name, head, obj)
static struct m0_addb2_source * s
void m0_reqh_service_type_unregister(struct m0_reqh_service_type *rstype)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
M0_INTERNAL void m0_conf_cache_unlock(struct m0_conf_cache *cache)
const struct m0_fid * m0_conf_objx_fid(const struct m0_confx_obj *obj)
const struct m0_reqh_service_ops * rs_ops