30 #include <linux/pagemap.h> 171 static void zerovec_init_pages(
void)
185 pages[
i] = alloc_page(GFP_KERNEL);
198 page_address(pages[
i]));
209 __free_page(pages[
i]);
230 zerovec_init_pages();
static m0_bcount_t seg_size
M0_INTERNAL int m0_0vec_init(struct m0_0vec *zvec, uint32_t segs_nr)
static m0_bindex_t indices[ZEROVEC_UT_SEGS_NR]
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL void m0_0vec_fini(struct m0_0vec *zvec)
M0_INTERNAL void m0_0vec_bvec_init(struct m0_0vec *zvec, const struct m0_bufvec *src, const m0_bindex_t *index)
static void zerovec_init_bufs(void)
M0_INTERNAL void m0_bufvec_free(struct m0_bufvec *bufvec)
static void zerovec_init(struct m0_0vec *zvec, const m0_bcount_t seg_size)
M0_INTERNAL uint64_t m0_rnd(uint64_t max, uint64_t *seed)
static m0_bcount_t counts[ZEROVEC_UT_SEGS_NR]
static void zerovec_init_cbuf(void)
static void zerovec_init_bvec(void)
M0_INTERNAL int m0_0vec_cbuf_add(struct m0_0vec *zvec, const struct m0_buf *buf, const m0_bindex_t *index)
M0_INTERNAL void m0_0vec_bufs_init(struct m0_0vec *zvec, void **bufs, const m0_bindex_t *index, const m0_bcount_t *counts, uint32_t segs_nr)
M0_INTERNAL void * m0_alloc_aligned(size_t size, unsigned shift)
M0_INTERNAL int m0_0vec_page_add(struct m0_0vec *zvec, struct page *pg, m0_bindex_t index)