Motr
M0
|
#include <ad.h>
Data Fields | |
int(* | bo_init )(struct m0_ad_balloc *ballroom, struct m0_be_seg *db, uint32_t bshift, m0_bcount_t container_size, m0_bcount_t blocks_per_group, m0_bcount_t spare_blocks_per_group) |
void(* | bo_fini )(struct m0_ad_balloc *ballroom) |
int(* | bo_alloc )(struct m0_ad_balloc *ballroom, struct m0_dtx *dtx, m0_bcount_t count, struct m0_ext *out, uint64_t alloc_zone) |
int(* | bo_free )(struct m0_ad_balloc *ballroom, struct m0_dtx *dtx, struct m0_ext *ext) |
void(* | bo_alloc_credit )(const struct m0_ad_balloc *ballroom, int nr, struct m0_be_tx_credit *accum) |
void(* | bo_free_credit )(const struct m0_ad_balloc *ballroom, int nr, struct m0_be_tx_credit *accum) |
int(* | bo_reserve_extent )(struct m0_ad_balloc *ballroom, struct m0_be_tx *tx, struct m0_ext *ext, uint64_t alloc_zone) |
int(* bo_alloc) (struct m0_ad_balloc *ballroom, struct m0_dtx *dtx, m0_bcount_t count, struct m0_ext *out, uint64_t alloc_zone) |
void(* bo_alloc_credit) (const struct m0_ad_balloc *ballroom, int nr, struct m0_be_tx_credit *accum) |
void(* bo_fini) (struct m0_ad_balloc *ballroom) |
int(* bo_free) (struct m0_ad_balloc *ballroom, struct m0_dtx *dtx, struct m0_ext *ext) |
void(* bo_free_credit) (const struct m0_ad_balloc *ballroom, int nr, struct m0_be_tx_credit *accum) |
int(* bo_init) (struct m0_ad_balloc *ballroom, struct m0_be_seg *db, uint32_t bshift, m0_bcount_t container_size, m0_bcount_t blocks_per_group, m0_bcount_t spare_blocks_per_group) |
Initialises this balloc instance, creating its persistent state, if necessary. This also destroys allocated struct m0_balloc instance on failure.
block | size shift in bytes, similarly to m0_stob_block_shift() |
container_size | Total size of the container in bytes |
blocks_per_group | # of blocks per group |
int(* bo_reserve_extent) (struct m0_ad_balloc *ballroom, struct m0_be_tx *tx, struct m0_ext *ext, uint64_t alloc_zone) |