25 #ifndef __MOTR_FID_FID_H__ 26 #define __MOTR_FID_FID_H__ 51 const struct m0_fid *fid1);
53 const struct m0_fid *fid1);
75 #define FID_F "<%" PRIx64 ":%" PRIx64 ">" 76 #define FID_SF " < %" SCNx64 " : %" SCNx64 " > " 77 #define FID_P(f) (f)->f_container, (f)->f_key 78 #define FID_S(f) &(f)->f_container, &(f)->f_key 80 #define M0_FID_TCONTAINER(type, container) \ 81 ((((uint64_t)(type)) << (64 - 8)) | \ 82 (((uint64_t)(container)) & M0_FID_TYPE_MASK)) 84 #define M0_FID_INIT(container, key) \ 86 .f_container = (container), \ 90 #define M0_FID_TINIT(type, container, key) \ 91 M0_FID_INIT(M0_FID_TCONTAINER((type), (container)), (key)) 93 #define M0_FID0 M0_FID_INIT(0ULL, 0ULL) 95 #define M0_FID_BUF(fid) ((struct m0_buf){ \ 96 .b_nob = sizeof *(fid), \
M0_INTERNAL uint64_t m0_fid_hash(const struct m0_fid *fid)
M0_INTERNAL void m0_fid_tset(struct m0_fid *fid, uint8_t tid, uint64_t container, uint64_t key)
struct m0_container container
M0_INTERNAL uint8_t m0_fid_tget(const struct m0_fid *fid)
M0_INTERNAL const struct m0_fid_type * m0_fid_type_get(uint8_t id)
M0_INTERNAL void m0_fid_fini(void)
M0_INTERNAL int m0_fid_cmp(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL bool m0_fid_is_set(const struct m0_fid *fid)
M0_INTERNAL void m0_fid_set(struct m0_fid *fid, uint64_t container, uint64_t key)
M0_INTERNAL void m0_fid_type_register(const struct m0_fid_type *fidt)
M0_INTERNAL void m0_fid_tgenerate(struct m0_fid *fid, const uint8_t tid)
M0_INTERNAL const struct m0_fid_type * m0_fid_type_gethi(uint64_t id)
M0_INTERNAL const struct m0_fid_type * m0_fid_type_getfid(const struct m0_fid *fid)
M0_INTERNAL int m0_fid_print(char *s, size_t s_len, const struct m0_fid *fid)
M0_INTERNAL void m0_fid_type_unregister(const struct m0_fid_type *fidt)
bool(* ft_is_valid)(const struct m0_fid *fid)
M0_INTERNAL bool m0_fid_arr_eq(const struct m0_fid_arr *a, const struct m0_fid_arr *b)
M0_INTERNAL int m0_fid_sscanf(const char *s, struct m0_fid *fid)
M0_INTERNAL const struct m0_fid_type * m0_fid_type_getname(const char *name)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL void m0_fid_tchange(struct m0_fid *fid, uint8_t tid)
M0_INTERNAL int m0_fid_arr_copy(struct m0_fid_arr *to, const struct m0_fid_arr *from)
static struct m0_fop_type * ft[]
M0_INTERNAL bool m0_fid_is_valid(const struct m0_fid *fid)
static struct m0_addb2_source * s
M0_INTERNAL bool m0_fid_arr_all_unique(const struct m0_fid_arr *a)
M0_INTERNAL void m0_fid_tassume(struct m0_fid *fid, const struct m0_fid_type *ft)
M0_INTERNAL int m0_fid_init(void)