29 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB 59 #define M0_BITMAP_WORDS(nr) (((nr) + (M0_BITMAP_BITS-1)) >> M0_BITMAP_BITSHIFT) 75 #define M0_BITMAP_SHIFT(idx) ((idx) >> M0_BITMAP_BITSHIFT) 84 #define M0_BITMAP_MASK(idx) (1UL << ((idx) & (M0_BITMAP_BITS-1))) 118 idx = __builtin_ffsll(
map->b_words[
i]);
131 for (idx = 0; idx <
map->b_nr; idx++) {
167 memcpy(
dst->b_words,
src->b_words,
s *
sizeof src->b_words[0]);
169 memset(&
dst->b_words[
s], 0, (d -
s) *
sizeof dst->b_words[0]);
177 for (
nr = 0,
i = 0;
i <
map->b_nr; ++
i)
224 #undef M0_TRACE_SUBSYSTEM
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
M0_INTERNAL void m0_bitmap_fini(struct m0_bitmap *map)
M0_INTERNAL size_t m0_bitmap_set_nr(const struct m0_bitmap *map)
#define M0_BITMAP_MASK(idx)
M0_BASSERT(M0_BITMAP_BITS==(1UL<< M0_BITMAP_BITSHIFT))
M0_INTERNAL void m0_bitmap_store(const struct m0_bitmap *im_map, struct m0_bitmap_onwire *ow_map)
M0_INTERNAL void m0_bitmap_onwire_fini(struct m0_bitmap_onwire *ow_map)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL int m0_bitmap_onwire_init(struct m0_bitmap_onwire *ow_map, size_t nr)
M0_INTERNAL int m0_bitmap_ffz(const struct m0_bitmap *map)
M0_INTERNAL void m0_bitmap_set(struct m0_bitmap *map, size_t idx, bool val)
#define M0_BITMAP_SHIFT(idx)
M0_INTERNAL int m0_bitmap_ffs(const struct m0_bitmap *map)
M0_INTERNAL void m0_bitmap_copy(struct m0_bitmap *dst, const struct m0_bitmap *src)
#define M0_BITMAP_WORDS(nr)
M0_INTERNAL bool m0_bitmap_get(const struct m0_bitmap *map, size_t idx)
M0_INTERNAL void m0_bitmap_reset(struct m0_bitmap *map)
M0_INTERNAL void m0_bitmap_load(const struct m0_bitmap_onwire *ow_map, struct m0_bitmap *im_map)
static struct m0_addb2_source * s
struct m0_pdclust_src_addr src