23 #ifndef __MOTR_CONF_OBJS_COMMON_H__ 24 #define __MOTR_CONF_OBJS_COMMON_H__ 41 #define X_CONF(_, NAME, ft_id) \ 42 M0_CONF__ ## NAME ## _FT_ID = ft_id, 48 #define M0_CONF__BOB_DEFINE(type, magic, check) \ 49 const struct m0_bob_type type ## _bob = { \ 51 .bt_magix_offset = M0_MAGIX_OFFSET(struct type, \ 52 type ## _cast_field.co_con_magic), \ 56 M0_BOB_DEFINE(static, &type ## _bob, type) 58 #define M0_CONF__INVARIANT_DEFINE(name, type) \ 59 static bool name(const struct m0_conf_obj *obj) \ 61 return type ## _bob_check(container_of(obj, struct type, \ 62 type ## _cast_field)); \ 64 struct __ ## type ## _semicolon_catcher 66 #define M0_CONF__CTOR_DEFINE(name, type, ops) \ 67 static struct m0_conf_obj *name(void) \ 70 struct m0_conf_obj *ret; \ 76 type ## _bob_init(x); \ 77 ret = &x->type ## _cast_field; \ 81 struct __ ## type ## _semicolon_catcher 88 #define CONF_DIR_ENTRIES(relfid, entry_type, entries) \ 89 ((struct conf_dir_entries){ (relfid), (entry_type), (entries) }) 113 M0_INTERNAL
bool arrays_eq(
const char **cached,
const struct m0_bufs *flat);
140 M0_INTERNAL
const struct m0_fid **
M0_INTERNAL int conf_dirs_encode(const struct conf_dir_encoding_pair *how, size_t how_nr)
const struct m0_fid_arr * de_entries
M0_INTERNAL void arrfid_free(struct m0_fid_arr *arr)
const struct m0_conf_obj_type * de_entry_type
struct m0_fid_arr * dep_dest
M0_INTERNAL int conf_pvers_encode(struct m0_fid_arr *dest, const struct m0_conf_pver **src)
M0_INTERNAL int dir_create_and_populate(struct m0_conf_dir **result, const struct conf_dir_entries *de, struct m0_conf_obj *dir_parent)
M0_INTERNAL bool arrays_eq(const char **cached, const struct m0_bufs *flat)
const struct m0_fid * dr_relfid
M0_INTERNAL int conf_obj_lookup_denied(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
const struct m0_fid * de_relfid
M0_INTERNAL void confx_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
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)
M0_INTERNAL int arrfid_from_dir(struct m0_fid_arr *dest, const struct m0_conf_dir *dir)
M0_INTERNAL const struct m0_fid ** conf_obj_downlinks_none(const struct m0_conf_obj *obj)
struct m0_conf_dir * dr_dir
M0_INTERNAL int u32arr_decode(const struct arr_u32 *src, uint32_t **dest)
M0_INTERNAL int u32arr_encode(struct arr_u32 *dest, const uint32_t *src, uint32_t src_nr)
M0_INTERNAL int conf_pvers_decode(struct m0_conf_pver ***dest, const struct m0_fid_arr *src, struct m0_conf_cache *cache)
M0_INTERNAL bool u32arr_cmp(const struct arr_u32 *a1, const uint32_t *a2, uint32_t a2_nr)
M0_INTERNAL void u32arr_free(struct arr_u32 *arr)
struct m0_pdclust_src_addr src
const struct m0_conf_dir * dep_src