#include "xfs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_bit.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_trace.h"
#define XFS_IEXT_STARTOFF_MASK …
#define XFS_IEXT_LENGTH_MASK …
#define XFS_IEXT_STARTBLOCK_MASK …
struct xfs_iext_rec { … };
static bool xfs_iext_rec_is_empty(struct xfs_iext_rec *rec)
{ … }
static inline void xfs_iext_rec_clear(struct xfs_iext_rec *rec)
{ … }
static void
xfs_iext_set(
struct xfs_iext_rec *rec,
struct xfs_bmbt_irec *irec)
{ … }
static void
xfs_iext_get(
struct xfs_bmbt_irec *irec,
struct xfs_iext_rec *rec)
{ … }
enum { … };
struct xfs_iext_node { … };
struct xfs_iext_leaf { … };
inline xfs_extnum_t xfs_iext_count(struct xfs_ifork *ifp)
{ … }
static inline int xfs_iext_max_recs(struct xfs_ifork *ifp)
{ … }
static inline struct xfs_iext_rec *cur_rec(struct xfs_iext_cursor *cur)
{ … }
static inline bool xfs_iext_valid(struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
static void *
xfs_iext_find_first_leaf(
struct xfs_ifork *ifp)
{ … }
static void *
xfs_iext_find_last_leaf(
struct xfs_ifork *ifp)
{ … }
void
xfs_iext_first(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
void
xfs_iext_last(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
void
xfs_iext_next(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
void
xfs_iext_prev(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
static inline int
xfs_iext_key_cmp(
struct xfs_iext_node *node,
int n,
xfs_fileoff_t offset)
{ … }
static inline int
xfs_iext_rec_cmp(
struct xfs_iext_rec *rec,
xfs_fileoff_t offset)
{ … }
static void *
xfs_iext_find_level(
struct xfs_ifork *ifp,
xfs_fileoff_t offset,
int level)
{ … }
static int
xfs_iext_node_pos(
struct xfs_iext_node *node,
xfs_fileoff_t offset)
{ … }
static int
xfs_iext_node_insert_pos(
struct xfs_iext_node *node,
xfs_fileoff_t offset)
{ … }
static int
xfs_iext_node_nr_entries(
struct xfs_iext_node *node,
int start)
{ … }
static int
xfs_iext_leaf_nr_entries(
struct xfs_ifork *ifp,
struct xfs_iext_leaf *leaf,
int start)
{ … }
static inline uint64_t
xfs_iext_leaf_key(
struct xfs_iext_leaf *leaf,
int n)
{ … }
static inline void *
xfs_iext_alloc_node(
int size)
{ … }
static void
xfs_iext_grow(
struct xfs_ifork *ifp)
{ … }
static void
xfs_iext_update_node(
struct xfs_ifork *ifp,
xfs_fileoff_t old_offset,
xfs_fileoff_t new_offset,
int level,
void *ptr)
{ … }
static struct xfs_iext_node *
xfs_iext_split_node(
struct xfs_iext_node **nodep,
int *pos,
int *nr_entries)
{ … }
static void
xfs_iext_insert_node(
struct xfs_ifork *ifp,
uint64_t offset,
void *ptr,
int level)
{ … }
static struct xfs_iext_leaf *
xfs_iext_split_leaf(
struct xfs_iext_cursor *cur,
int *nr_entries)
{ … }
static void
xfs_iext_alloc_root(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
static void
xfs_iext_realloc_root(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur)
{ … }
static inline void xfs_iext_inc_seq(struct xfs_ifork *ifp)
{ … }
void
xfs_iext_insert_raw(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur,
struct xfs_bmbt_irec *irec)
{ … }
void
xfs_iext_insert(
struct xfs_inode *ip,
struct xfs_iext_cursor *cur,
struct xfs_bmbt_irec *irec,
int state)
{ … }
static struct xfs_iext_node *
xfs_iext_rebalance_node(
struct xfs_iext_node *parent,
int *pos,
struct xfs_iext_node *node,
int nr_entries)
{ … }
static void
xfs_iext_remove_node(
struct xfs_ifork *ifp,
xfs_fileoff_t offset,
void *victim)
{ … }
static void
xfs_iext_rebalance_leaf(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur,
struct xfs_iext_leaf *leaf,
xfs_fileoff_t offset,
int nr_entries)
{ … }
static void
xfs_iext_free_last_leaf(
struct xfs_ifork *ifp)
{ … }
void
xfs_iext_remove(
struct xfs_inode *ip,
struct xfs_iext_cursor *cur,
int state)
{ … }
bool
xfs_iext_lookup_extent(
struct xfs_inode *ip,
struct xfs_ifork *ifp,
xfs_fileoff_t offset,
struct xfs_iext_cursor *cur,
struct xfs_bmbt_irec *gotp)
{ … }
bool
xfs_iext_lookup_extent_before(
struct xfs_inode *ip,
struct xfs_ifork *ifp,
xfs_fileoff_t *end,
struct xfs_iext_cursor *cur,
struct xfs_bmbt_irec *gotp)
{ … }
void
xfs_iext_update_extent(
struct xfs_inode *ip,
int state,
struct xfs_iext_cursor *cur,
struct xfs_bmbt_irec *new)
{ … }
bool
xfs_iext_get_extent(
struct xfs_ifork *ifp,
struct xfs_iext_cursor *cur,
struct xfs_bmbt_irec *gotp)
{ … }
static void
xfs_iext_destroy_node(
struct xfs_iext_node *node,
int level)
{ … }
void
xfs_iext_destroy(
struct xfs_ifork *ifp)
{ … }