#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_bit.h"
#include "xfs_mount.h"
#include "xfs_btree.h"
#include "xfs_btree_staging.h"
#include "xfs_ialloc.h"
#include "xfs_ialloc_btree.h"
#include "xfs_alloc.h"
#include "xfs_error.h"
#include "xfs_health.h"
#include "xfs_trace.h"
#include "xfs_trans.h"
#include "xfs_rmap.h"
#include "xfs_ag.h"
static struct kmem_cache *xfs_inobt_cur_cache;
STATIC int
xfs_inobt_get_minrecs(
struct xfs_btree_cur *cur,
int level)
{ … }
STATIC struct xfs_btree_cur *
xfs_inobt_dup_cursor(
struct xfs_btree_cur *cur)
{ … }
STATIC struct xfs_btree_cur *
xfs_finobt_dup_cursor(
struct xfs_btree_cur *cur)
{ … }
STATIC void
xfs_inobt_set_root(
struct xfs_btree_cur *cur,
const union xfs_btree_ptr *nptr,
int inc)
{ … }
STATIC void
xfs_finobt_set_root(
struct xfs_btree_cur *cur,
const union xfs_btree_ptr *nptr,
int inc)
{ … }
static inline void
xfs_inobt_mod_blockcount(
struct xfs_btree_cur *cur,
int howmuch)
{ … }
STATIC int
__xfs_inobt_alloc_block(
struct xfs_btree_cur *cur,
const union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
int *stat,
enum xfs_ag_resv_type resv)
{ … }
STATIC int
xfs_inobt_alloc_block(
struct xfs_btree_cur *cur,
const union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
int *stat)
{ … }
STATIC int
xfs_finobt_alloc_block(
struct xfs_btree_cur *cur,
const union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
int *stat)
{ … }
STATIC int
__xfs_inobt_free_block(
struct xfs_btree_cur *cur,
struct xfs_buf *bp,
enum xfs_ag_resv_type resv)
{ … }
STATIC int
xfs_inobt_free_block(
struct xfs_btree_cur *cur,
struct xfs_buf *bp)
{ … }
STATIC int
xfs_finobt_free_block(
struct xfs_btree_cur *cur,
struct xfs_buf *bp)
{ … }
STATIC int
xfs_inobt_get_maxrecs(
struct xfs_btree_cur *cur,
int level)
{ … }
STATIC void
xfs_inobt_init_key_from_rec(
union xfs_btree_key *key,
const union xfs_btree_rec *rec)
{ … }
STATIC void
xfs_inobt_init_high_key_from_rec(
union xfs_btree_key *key,
const union xfs_btree_rec *rec)
{ … }
STATIC void
xfs_inobt_init_rec_from_cur(
struct xfs_btree_cur *cur,
union xfs_btree_rec *rec)
{ … }
STATIC void
xfs_inobt_init_ptr_from_cur(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *ptr)
{ … }
STATIC void
xfs_finobt_init_ptr_from_cur(
struct xfs_btree_cur *cur,
union xfs_btree_ptr *ptr)
{ … }
STATIC int64_t
xfs_inobt_key_diff(
struct xfs_btree_cur *cur,
const union xfs_btree_key *key)
{ … }
STATIC int64_t
xfs_inobt_diff_two_keys(
struct xfs_btree_cur *cur,
const union xfs_btree_key *k1,
const union xfs_btree_key *k2,
const union xfs_btree_key *mask)
{ … }
static xfs_failaddr_t
xfs_inobt_verify(
struct xfs_buf *bp)
{ … }
static void
xfs_inobt_read_verify(
struct xfs_buf *bp)
{ … }
static void
xfs_inobt_write_verify(
struct xfs_buf *bp)
{ … }
const struct xfs_buf_ops xfs_inobt_buf_ops = …;
const struct xfs_buf_ops xfs_finobt_buf_ops = …;
STATIC int
xfs_inobt_keys_inorder(
struct xfs_btree_cur *cur,
const union xfs_btree_key *k1,
const union xfs_btree_key *k2)
{ … }
STATIC int
xfs_inobt_recs_inorder(
struct xfs_btree_cur *cur,
const union xfs_btree_rec *r1,
const union xfs_btree_rec *r2)
{ … }
STATIC enum xbtree_key_contig
xfs_inobt_keys_contiguous(
struct xfs_btree_cur *cur,
const union xfs_btree_key *key1,
const union xfs_btree_key *key2,
const union xfs_btree_key *mask)
{ … }
const struct xfs_btree_ops xfs_inobt_ops = …;
const struct xfs_btree_ops xfs_finobt_ops = …;
struct xfs_btree_cur *
xfs_inobt_init_cursor(
struct xfs_perag *pag,
struct xfs_trans *tp,
struct xfs_buf *agbp)
{ … }
struct xfs_btree_cur *
xfs_finobt_init_cursor(
struct xfs_perag *pag,
struct xfs_trans *tp,
struct xfs_buf *agbp)
{ … }
void
xfs_inobt_commit_staged_btree(
struct xfs_btree_cur *cur,
struct xfs_trans *tp,
struct xfs_buf *agbp)
{ … }
static inline unsigned int
xfs_inobt_block_maxrecs(
unsigned int blocklen,
bool leaf)
{ … }
int
xfs_inobt_maxrecs(
struct xfs_mount *mp,
int blocklen,
int leaf)
{ … }
#define XFS_MAX_INODE_RECORDS …
static inline unsigned int
xfs_inobt_maxlevels_ondisk(void)
{ … }
static inline unsigned int
xfs_finobt_maxlevels_ondisk(void)
{ … }
unsigned int
xfs_iallocbt_maxlevels_ondisk(void)
{ … }
uint64_t
xfs_inobt_irec_to_allocmask(
const struct xfs_inobt_rec_incore *rec)
{ … }
#if defined(DEBUG) || defined(XFS_WARN)
int
xfs_inobt_rec_check_count(
struct xfs_mount *mp,
struct xfs_inobt_rec_incore *rec)
{ … }
#endif
static xfs_extlen_t
xfs_inobt_max_size(
struct xfs_perag *pag)
{ … }
static int
xfs_finobt_count_blocks(
struct xfs_perag *pag,
struct xfs_trans *tp,
xfs_extlen_t *tree_blocks)
{ … }
static int
xfs_finobt_read_blocks(
struct xfs_perag *pag,
struct xfs_trans *tp,
xfs_extlen_t *tree_blocks)
{ … }
int
xfs_finobt_calc_reserves(
struct xfs_perag *pag,
struct xfs_trans *tp,
xfs_extlen_t *ask,
xfs_extlen_t *used)
{ … }
xfs_extlen_t
xfs_iallocbt_calc_size(
struct xfs_mount *mp,
unsigned long long len)
{ … }
int __init
xfs_inobt_init_cur_cache(void)
{ … }
void
xfs_inobt_destroy_cur_cache(void)
{ … }