#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_defer.h"
#include "xfs_btree.h"
#include "xfs_buf_mem.h"
#include "xfs_btree_mem.h"
#include "xfs_error.h"
#include "scrub/rcbag_btree.h"
#include "scrub/trace.h"
static struct kmem_cache *rcbagbt_cur_cache;
STATIC void
rcbagbt_init_key_from_rec(
union xfs_btree_key *key,
const union xfs_btree_rec *rec)
{ … }
STATIC void
rcbagbt_init_rec_from_cur(
struct xfs_btree_cur *cur,
union xfs_btree_rec *rec)
{ … }
STATIC int64_t
rcbagbt_key_diff(
struct xfs_btree_cur *cur,
const union xfs_btree_key *key)
{ … }
STATIC int64_t
rcbagbt_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 int
rcbagbt_keys_inorder(
struct xfs_btree_cur *cur,
const union xfs_btree_key *k1,
const union xfs_btree_key *k2)
{ … }
STATIC int
rcbagbt_recs_inorder(
struct xfs_btree_cur *cur,
const union xfs_btree_rec *r1,
const union xfs_btree_rec *r2)
{ … }
static xfs_failaddr_t
rcbagbt_verify(
struct xfs_buf *bp)
{ … }
static void
rcbagbt_rw_verify(
struct xfs_buf *bp)
{ … }
static const struct xfs_buf_ops rcbagbt_mem_buf_ops = …;
static const struct xfs_btree_ops rcbagbt_mem_ops = …;
struct xfs_btree_cur *
rcbagbt_mem_cursor(
struct xfs_mount *mp,
struct xfs_trans *tp,
struct xfbtree *xfbtree)
{ … }
int
rcbagbt_mem_init(
struct xfs_mount *mp,
struct xfbtree *xfbt,
struct xfs_buftarg *btp)
{ … }
static inline unsigned int
rcbagbt_block_maxrecs(
unsigned int blocklen,
bool leaf)
{ … }
unsigned int
rcbagbt_maxrecs(
struct xfs_mount *mp,
unsigned int blocklen,
bool leaf)
{ … }
unsigned int
rcbagbt_maxlevels_possible(void)
{ … }
unsigned long long
rcbagbt_calc_size(
unsigned long long nr_records)
{ … }
int __init
rcbagbt_init_cur_cache(void)
{ … }
void
rcbagbt_destroy_cur_cache(void)
{ … }
int
rcbagbt_lookup_eq(
struct xfs_btree_cur *cur,
const struct xfs_rmap_irec *rmap,
int *success)
{ … }
int
rcbagbt_get_rec(
struct xfs_btree_cur *cur,
struct rcbag_rec *rec,
int *has)
{ … }
int
rcbagbt_update(
struct xfs_btree_cur *cur,
const struct rcbag_rec *rec)
{ … }
int
rcbagbt_insert(
struct xfs_btree_cur *cur,
const struct rcbag_rec *rec,
int *success)
{ … }