/* * Addresses of records, keys, and pointers within an incore rtrefcountbt block. * * (note that some of these may appear unused, but they are used in userspace)
*/ staticinlinestruct xfs_refcount_rec *
xfs_rtrefcount_rec_addr( struct xfs_btree_block *block, unsignedint index)
{ return (struct xfs_refcount_rec *)
((char *)block + XFS_RTREFCOUNT_BLOCK_LEN +
(index - 1) * sizeof(struct xfs_refcount_rec));
}
/* * Address of pointers within the incore btree root. * * These are to be used when we know the size of the block and * we don't have a cursor.
*/ staticinline xfs_rtrefcount_ptr_t *
xfs_rtrefcount_broot_ptr_addr( struct xfs_mount *mp, struct xfs_btree_block *bb, unsignedint index, unsignedint block_size)
{ return xfs_rtrefcount_ptr_addr(bb, index,
xfs_rtrefcountbt_maxrecs(mp, block_size, false));
}
/* * Compute the space required for the incore btree root containing the given * number of records.
*/ staticinline size_t
xfs_rtrefcount_broot_space_calc( struct xfs_mount *mp, unsignedint level, unsignedint nrecs)
{
size_t sz = XFS_RTREFCOUNT_BLOCK_LEN;
/* * Compute the space required for the ondisk root block given an incore root * block.
*/ staticinline size_t
xfs_rtrefcount_droot_space(struct xfs_btree_block *bb)
{ return xfs_rtrefcount_droot_space_calc(be16_to_cpu(bb->bb_level),
be16_to_cpu(bb->bb_numrecs));
}
int xfs_iformat_rtrefcount(struct xfs_inode *ip, struct xfs_dinode *dip); void xfs_rtrefcountbt_to_disk(struct xfs_mount *mp, struct xfs_btree_block *rblock, int rblocklen, struct xfs_rtrefcount_root *dblock, int dblocklen); void xfs_iflush_rtrefcount(struct xfs_inode *ip, struct xfs_dinode *dip);
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.