/* Create an in-memory refcount bag btree. */ int
rcbagbt_mem_init( struct xfs_mount *mp, struct xfbtree *xfbt, struct xfs_buftarg *btp)
{
xfbt->owner = 0; return xfbtree_init(mp, xfbt, btp, &rcbagbt_mem_ops);
}
/* Calculate number of records in a refcount bag btree block. */ staticinlineunsignedint
rcbagbt_block_maxrecs( unsignedint blocklen, bool leaf)
{ if (leaf) return blocklen / sizeof(struct rcbag_rec); return blocklen /
(sizeof(struct rcbag_key) + sizeof(rcbag_ptr_t));
}
/* * Calculate number of records in an refcount bag btree block.
*/ unsignedint
rcbagbt_maxrecs( struct xfs_mount *mp, unsignedint blocklen, bool leaf)
{
blocklen -= RCBAG_BLOCK_LEN; return rcbagbt_block_maxrecs(blocklen, leaf);
}
/* Compute the max possible height for refcount bag btrees. */ unsignedint
rcbagbt_maxlevels_possible(void)
{ unsignedint minrecs[2]; unsignedint blocklen;
/* Calculate the refcount bag btree size for some records. */ unsignedlonglong
rcbagbt_calc_size( unsignedlonglong nr_records)
{ unsignedint minrecs[2]; unsignedint blocklen;
/* Look up the refcount bag record corresponding to this reverse mapping. */ int
rcbagbt_lookup_eq( struct xfs_btree_cur *cur, conststruct xfs_rmap_irec *rmap, int *success)
{ struct rcbag_rec *rec = (struct rcbag_rec *)&cur->bc_rec;
/* Get the data from the pointed-to record. */ int
rcbagbt_get_rec( struct xfs_btree_cur *cur, struct rcbag_rec *rec, int *has)
{ union xfs_btree_rec *btrec; int error;
/* Update the record referred to by cur to the value given. */ int
rcbagbt_update( struct xfs_btree_cur *cur, conststruct rcbag_rec *rec)
{ union xfs_btree_rec btrec;
/* Update the record referred to by cur to the value given. */ int
rcbagbt_insert( struct xfs_btree_cur *cur, conststruct rcbag_rec *rec, int *success)
{ struct rcbag_rec *btrec = (struct rcbag_rec *)&cur->bc_rec;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.