#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_inode.h"
#include "xfs_trans.h"
#include "xfs_alloc.h"
#include "xfs_btree.h"
#include "xfs_btree_staging.h"
#include "xfs_bmap_btree.h"
#include "xfs_bmap.h"
#include "xfs_error.h"
#include "xfs_quota.h"
#include "xfs_trace.h"
#include "xfs_rmap.h"
#include "xfs_ag.h"
static struct kmem_cache *xfs_bmbt_cur_cache;
void
xfs_bmbt_init_block(
struct xfs_inode *ip,
struct xfs_btree_block *buf,
struct xfs_buf *bp,
__u16 level,
__u16 numrecs)
{ … }
void
xfs_bmdr_to_bmbt(
struct xfs_inode *ip,
xfs_bmdr_block_t *dblock,
int dblocklen,
struct xfs_btree_block *rblock,
int rblocklen)
{ … }
void
xfs_bmbt_disk_get_all(
const struct xfs_bmbt_rec *rec,
struct xfs_bmbt_irec *irec)
{ … }
xfs_filblks_t
xfs_bmbt_disk_get_blockcount(
const struct xfs_bmbt_rec *r)
{ … }
xfs_fileoff_t
xfs_bmbt_disk_get_startoff(
const struct xfs_bmbt_rec *r)
{ … }
void
xfs_bmbt_disk_set_all(
struct xfs_bmbt_rec *r,
struct xfs_bmbt_irec *s)
{ … }
void
xfs_bmbt_to_bmdr(
struct xfs_mount *mp,
struct xfs_btree_block *rblock,
int rblocklen,
xfs_bmdr_block_t *dblock,
int dblocklen)
{ … }
STATIC struct xfs_btree_cur *
xfs_bmbt_dup_cursor(
struct xfs_btree_cur *cur)
{ … }
STATIC void
xfs_bmbt_update_cursor(
struct xfs_btree_cur *src,
struct xfs_btree_cur *dst)
{ … }
STATIC int
xfs_bmbt_alloc_block(
struct xfs_btree_cur *cur,
const union xfs_btree_ptr *start,
union xfs_btree_ptr *new,
int *stat)
{ … }
STATIC int
xfs_bmbt_free_block(
struct xfs_btree_cur *cur,
struct xfs_buf *bp)
{ … }
STATIC int
xfs_bmbt_get_minrecs(
struct xfs_btree_cur *cur,
int level)
{ … }
int
xfs_bmbt_get_maxrecs(
struct xfs_btree_cur *cur,
int level)
{ … }
STATIC int
xfs_bmbt_get_dmaxrecs(
struct xfs_btree_cur *cur,
int level)
{ … }
STATIC void
xfs_bmbt_init_key_from_rec(
union xfs_btree_key *key,
const union xfs_btree_rec *rec)
{ … }
STATIC void
xfs_bmbt_init_high_key_from_rec(
union xfs_btree_key *key,
const union xfs_btree_rec *rec)
{ … }
STATIC void
xfs_bmbt_init_rec_from_cur(
struct xfs_btree_cur *cur,
union xfs_btree_rec *rec)
{ … }
STATIC int64_t
xfs_bmbt_key_diff(
struct xfs_btree_cur *cur,
const union xfs_btree_key *key)
{ … }
STATIC int64_t
xfs_bmbt_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_bmbt_verify(
struct xfs_buf *bp)
{ … }
static void
xfs_bmbt_read_verify(
struct xfs_buf *bp)
{ … }
static void
xfs_bmbt_write_verify(
struct xfs_buf *bp)
{ … }
const struct xfs_buf_ops xfs_bmbt_buf_ops = …;
STATIC int
xfs_bmbt_keys_inorder(
struct xfs_btree_cur *cur,
const union xfs_btree_key *k1,
const union xfs_btree_key *k2)
{ … }
STATIC int
xfs_bmbt_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_bmbt_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_bmbt_ops = …;
struct xfs_btree_cur *
xfs_bmbt_init_cursor(
struct xfs_mount *mp,
struct xfs_trans *tp,
struct xfs_inode *ip,
int whichfork)
{ … }
static inline unsigned int
xfs_bmbt_block_maxrecs(
unsigned int blocklen,
bool leaf)
{ … }
void
xfs_bmbt_commit_staged_btree(
struct xfs_btree_cur *cur,
struct xfs_trans *tp,
int whichfork)
{ … }
int
xfs_bmbt_maxrecs(
struct xfs_mount *mp,
int blocklen,
int leaf)
{ … }
unsigned int
xfs_bmbt_maxlevels_ondisk(void)
{ … }
int
xfs_bmdr_maxrecs(
int blocklen,
int leaf)
{ … }
int
xfs_bmbt_change_owner(
struct xfs_trans *tp,
struct xfs_inode *ip,
int whichfork,
xfs_ino_t new_owner,
struct list_head *buffer_list)
{ … }
unsigned long long
xfs_bmbt_calc_size(
struct xfs_mount *mp,
unsigned long long len)
{ … }
int __init
xfs_bmbt_init_cur_cache(void)
{ … }
void
xfs_bmbt_destroy_cur_cache(void)
{ … }