Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
xfs_attr_leaf.c File Reference
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_bit.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_da_btree.h"
#include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h"
#include "xfs_alloc.h"
#include "xfs_btree.h"
#include "xfs_attr_sf.h"
#include "xfs_dinode.h"
#include "xfs_inode.h"
#include "xfs_inode_item.h"
#include "xfs_bmap.h"
#include "xfs_attr.h"
#include "xfs_attr_leaf.h"
#include "xfs_error.h"
#include "xfs_trace.h"

Go to the source code of this file.

Macros

#define XFS_ISRESET_CURSOR(cursor)
 
#define XFS_ATTR_ABS(A)   (((A) < 0) ? -(A) : (A))
 

Functions

STATIC int xfs_attr_leaf_create (xfs_da_args_t *args, xfs_dablk_t which_block, struct xfs_buf **bpp)
 
STATIC int xfs_attr_leaf_add_work (struct xfs_buf *leaf_buffer, xfs_da_args_t *args, int freemap_index)
 
STATIC void xfs_attr_leaf_compact (xfs_trans_t *tp, struct xfs_buf *leaf_buffer)
 
STATIC void xfs_attr_leaf_rebalance (xfs_da_state_t *state, xfs_da_state_blk_t *blk1, xfs_da_state_blk_t *blk2)
 
STATIC int xfs_attr_leaf_figure_balance (xfs_da_state_t *state, xfs_da_state_blk_t *leaf_blk_1, xfs_da_state_blk_t *leaf_blk_2, int *number_entries_in_blk1, int *number_usedbytes_in_blk1)
 
STATIC int xfs_attr_node_inactive (xfs_trans_t **trans, xfs_inode_t *dp, struct xfs_buf *bp, int level)
 
STATIC int xfs_attr_leaf_inactive (xfs_trans_t **trans, xfs_inode_t *dp, struct xfs_buf *bp)
 
STATIC int xfs_attr_leaf_freextent (xfs_trans_t **trans, xfs_inode_t *dp, xfs_dablk_t blkno, int blkcnt)
 
STATIC void xfs_attr_leaf_moveents (xfs_attr_leafblock_t *src_leaf, int src_start, xfs_attr_leafblock_t *dst_leaf, int dst_start, int move_count, xfs_mount_t *mp)
 
STATIC int xfs_attr_leaf_entsize (xfs_attr_leafblock_t *leaf, int index)
 
STATIC int xfs_attr_namesp_match (int arg_flags, int ondisk_flags)
 
int xfs_attr_shortform_bytesfit (xfs_inode_t *dp, int bytes)
 
STATIC void xfs_sbversion_add_attr2 (xfs_mount_t *mp, xfs_trans_t *tp)
 
void xfs_attr_shortform_create (xfs_da_args_t *args)
 
void xfs_attr_shortform_add (xfs_da_args_t *args, int forkoff)
 
STATIC void xfs_attr_fork_reset (struct xfs_inode *ip, struct xfs_trans *tp)
 
int xfs_attr_shortform_remove (xfs_da_args_t *args)
 
int xfs_attr_shortform_lookup (xfs_da_args_t *args)
 
int xfs_attr_shortform_getvalue (xfs_da_args_t *args)
 
int xfs_attr_shortform_to_leaf (xfs_da_args_t *args)
 
STATIC int xfs_attr_shortform_compare (const void *a, const void *b)
 
int xfs_attr_shortform_list (xfs_attr_list_context_t *context)
 
int xfs_attr_shortform_allfit (struct xfs_buf *bp, struct xfs_inode *dp)
 
int xfs_attr_leaf_to_shortform (struct xfs_buf *bp, xfs_da_args_t *args, int forkoff)
 
int xfs_attr_leaf_to_node (xfs_da_args_t *args)
 
int xfs_attr_leaf_split (xfs_da_state_t *state, xfs_da_state_blk_t *oldblk, xfs_da_state_blk_t *newblk)
 
int xfs_attr_leaf_add (struct xfs_buf *bp, struct xfs_da_args *args)
 
STATIC void xfs_attr_leaf_compact (struct xfs_trans *trans, struct xfs_buf *bp)
 
int xfs_attr_leaf_toosmall (xfs_da_state_t *state, int *action)
 
int xfs_attr_leaf_remove (struct xfs_buf *bp, xfs_da_args_t *args)
 
void xfs_attr_leaf_unbalance (xfs_da_state_t *state, xfs_da_state_blk_t *drop_blk, xfs_da_state_blk_t *save_blk)
 
int xfs_attr_leaf_lookup_int (struct xfs_buf *bp, xfs_da_args_t *args)
 
int xfs_attr_leaf_getvalue (struct xfs_buf *bp, xfs_da_args_t *args)
 
int xfs_attr_leaf_order (struct xfs_buf *leaf1_bp, struct xfs_buf *leaf2_bp)
 
xfs_dahash_t xfs_attr_leaf_lasthash (struct xfs_buf *bp, int *count)
 
int xfs_attr_leaf_newentsize (int namelen, int valuelen, int blocksize, int *local)
 
int xfs_attr_leaf_list_int (struct xfs_buf *bp, xfs_attr_list_context_t *context)
 
int xfs_attr_leaf_clearflag (xfs_da_args_t *args)
 
int xfs_attr_leaf_setflag (xfs_da_args_t *args)
 
int xfs_attr_leaf_flipflags (xfs_da_args_t *args)
 
int xfs_attr_root_inactive (xfs_trans_t **trans, xfs_inode_t *dp)
 
STATIC int xfs_attr_node_inactive (struct xfs_trans **trans, struct xfs_inode *dp, struct xfs_buf *bp, int level)
 
STATIC int xfs_attr_leaf_inactive (struct xfs_trans **trans, struct xfs_inode *dp, struct xfs_buf *bp)
 

Macro Definition Documentation

#define XFS_ATTR_ABS (   A)    (((A) < 0) ? -(A) : (A))
#define XFS_ISRESET_CURSOR (   cursor)
Value:
(!((cursor)->initted) && !((cursor)->hashval) && \
!((cursor)->blkno) && !((cursor)->offset))

Definition at line 574 of file xfs_attr_leaf.c.

Function Documentation

STATIC void xfs_attr_fork_reset ( struct xfs_inode *  ip,
struct xfs_trans *  tp 
)

Definition at line 317 of file xfs_attr_leaf.c.

int xfs_attr_leaf_add ( struct xfs_buf bp,
struct xfs_da_args args 
)

Definition at line 1018 of file xfs_attr_leaf.c.

STATIC int xfs_attr_leaf_add_work ( struct xfs_buf leaf_buffer,
xfs_da_args_t args,
int  freemap_index 
)

Definition at line 1091 of file xfs_attr_leaf.c.

int xfs_attr_leaf_clearflag ( xfs_da_args_t args)

Definition at line 2497 of file xfs_attr_leaf.c.

STATIC void xfs_attr_leaf_compact ( xfs_trans_t *  tp,
struct xfs_buf leaf_buffer 
)
STATIC void xfs_attr_leaf_compact ( struct xfs_trans *  trans,
struct xfs_buf bp 
)

Definition at line 1216 of file xfs_attr_leaf.c.

STATIC int xfs_attr_leaf_create ( xfs_da_args_t args,
xfs_dablk_t  which_block,
struct xfs_buf **  bpp 
)

Definition at line 917 of file xfs_attr_leaf.c.

STATIC int xfs_attr_leaf_entsize ( xfs_attr_leafblock_t leaf,
int  index 
)

Definition at line 2327 of file xfs_attr_leaf.c.

STATIC int xfs_attr_leaf_figure_balance ( xfs_da_state_t state,
xfs_da_state_blk_t leaf_blk_1,
xfs_da_state_blk_t leaf_blk_2,
int number_entries_in_blk1,
int number_usedbytes_in_blk1 
)

Definition at line 1461 of file xfs_attr_leaf.c.

int xfs_attr_leaf_flipflags ( xfs_da_args_t args)

Definition at line 2618 of file xfs_attr_leaf.c.

STATIC int xfs_attr_leaf_freextent ( xfs_trans_t **  trans,
xfs_inode_t *  dp,
xfs_dablk_t  blkno,
int  blkcnt 
)

Definition at line 2982 of file xfs_attr_leaf.c.

int xfs_attr_leaf_getvalue ( struct xfs_buf bp,
xfs_da_args_t args 
)

Definition at line 2072 of file xfs_attr_leaf.c.

STATIC int xfs_attr_leaf_inactive ( xfs_trans_t **  trans,
xfs_inode_t *  dp,
struct xfs_buf bp 
)
STATIC int xfs_attr_leaf_inactive ( struct xfs_trans **  trans,
struct xfs_inode *  dp,
struct xfs_buf bp 
)

Definition at line 2900 of file xfs_attr_leaf.c.

xfs_dahash_t xfs_attr_leaf_lasthash ( struct xfs_buf bp,
int count 
)

Definition at line 2307 of file xfs_attr_leaf.c.

int xfs_attr_leaf_list_int ( struct xfs_buf bp,
xfs_attr_list_context_t context 
)

Definition at line 2374 of file xfs_attr_leaf.c.

int xfs_attr_leaf_lookup_int ( struct xfs_buf bp,
xfs_da_args_t args 
)

Definition at line 1963 of file xfs_attr_leaf.c.

STATIC void xfs_attr_leaf_moveents ( xfs_attr_leafblock_t src_leaf,
int  src_start,
xfs_attr_leafblock_t dst_leaf,
int  dst_start,
int  move_count,
xfs_mount_t *  mp 
)

Definition at line 2134 of file xfs_attr_leaf.c.

int xfs_attr_leaf_newentsize ( int  namelen,
int  valuelen,
int  blocksize,
int local 
)

Definition at line 2352 of file xfs_attr_leaf.c.

int xfs_attr_leaf_order ( struct xfs_buf leaf1_bp,
struct xfs_buf leaf2_bp 
)

Definition at line 2280 of file xfs_attr_leaf.c.

STATIC void xfs_attr_leaf_rebalance ( xfs_da_state_t state,
xfs_da_state_blk_t blk1,
xfs_da_state_blk_t blk2 
)

Definition at line 1276 of file xfs_attr_leaf.c.

int xfs_attr_leaf_remove ( struct xfs_buf bp,
xfs_da_args_t args 
)

Definition at line 1693 of file xfs_attr_leaf.c.

int xfs_attr_leaf_setflag ( xfs_da_args_t args)

Definition at line 2566 of file xfs_attr_leaf.c.

int xfs_attr_leaf_split ( xfs_da_state_t state,
xfs_da_state_blk_t oldblk,
xfs_da_state_blk_t newblk 
)

Definition at line 961 of file xfs_attr_leaf.c.

int xfs_attr_leaf_to_node ( xfs_da_args_t args)

Definition at line 856 of file xfs_attr_leaf.c.

int xfs_attr_leaf_to_shortform ( struct xfs_buf bp,
xfs_da_args_t args,
int  forkoff 
)

Definition at line 777 of file xfs_attr_leaf.c.

int xfs_attr_leaf_toosmall ( xfs_da_state_t state,
int action 
)

Definition at line 1571 of file xfs_attr_leaf.c.

void xfs_attr_leaf_unbalance ( xfs_da_state_t state,
xfs_da_state_blk_t drop_blk,
xfs_da_state_blk_t save_blk 
)

Definition at line 1853 of file xfs_attr_leaf.c.

STATIC int xfs_attr_namesp_match ( int  arg_flags,
int  ondisk_flags 
)

Definition at line 99 of file xfs_attr_leaf.c.

STATIC int xfs_attr_node_inactive ( xfs_trans_t **  trans,
xfs_inode_t *  dp,
struct xfs_buf bp,
int  level 
)
STATIC int xfs_attr_node_inactive ( struct xfs_trans **  trans,
struct xfs_inode *  dp,
struct xfs_buf bp,
int  level 
)

Definition at line 2790 of file xfs_attr_leaf.c.

int xfs_attr_root_inactive ( xfs_trans_t **  trans,
xfs_inode_t *  dp 
)

Definition at line 2736 of file xfs_attr_leaf.c.

void xfs_attr_shortform_add ( xfs_da_args_t args,
int  forkoff 
)

Definition at line 263 of file xfs_attr_leaf.c.

int xfs_attr_shortform_allfit ( struct xfs_buf bp,
struct xfs_inode *  dp 
)

Definition at line 738 of file xfs_attr_leaf.c.

int xfs_attr_shortform_bytesfit ( xfs_inode_t *  dp,
int  bytes 
)

Definition at line 120 of file xfs_attr_leaf.c.

STATIC int xfs_attr_shortform_compare ( const void a,
const void b 
)

Definition at line 558 of file xfs_attr_leaf.c.

void xfs_attr_shortform_create ( xfs_da_args_t args)

Definition at line 231 of file xfs_attr_leaf.c.

int xfs_attr_shortform_getvalue ( xfs_da_args_t args)

Definition at line 437 of file xfs_attr_leaf.c.

int xfs_attr_shortform_list ( xfs_attr_list_context_t context)

Definition at line 586 of file xfs_attr_leaf.c.

int xfs_attr_shortform_lookup ( xfs_da_args_t args)

Definition at line 406 of file xfs_attr_leaf.c.

int xfs_attr_shortform_remove ( xfs_da_args_t args)

Definition at line 335 of file xfs_attr_leaf.c.

int xfs_attr_shortform_to_leaf ( xfs_da_args_t args)

Definition at line 474 of file xfs_attr_leaf.c.

STATIC void xfs_sbversion_add_attr2 ( xfs_mount_t *  mp,
xfs_trans_t *  tp 
)

Definition at line 213 of file xfs_attr_leaf.c.