Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
xfs_alloc.h File Reference

Go to the source code of this file.

Data Structures

struct  xfs_alloc_arg
 

Macros

#define XFS_ALLOCTYPE_ANY_AG   0x01 /* allocate anywhere, use rotor */
 
#define XFS_ALLOCTYPE_FIRST_AG   0x02 /* ... start at ag 0 */
 
#define XFS_ALLOCTYPE_START_AG   0x04 /* anywhere, start in this a.g. */
 
#define XFS_ALLOCTYPE_THIS_AG   0x08 /* anywhere in this a.g. */
 
#define XFS_ALLOCTYPE_START_BNO   0x10 /* near this block else anywhere */
 
#define XFS_ALLOCTYPE_NEAR_BNO   0x20 /* in this a.g. and near this block */
 
#define XFS_ALLOCTYPE_THIS_BNO   0x40 /* at exactly this block */
 
#define XFS_ALLOC_TYPES
 
#define XFS_ALLOC_FLAG_TRYLOCK   0x00000001 /* use trylock for buffer locking */
 
#define XFS_ALLOC_FLAG_FREEING   0x00000002 /* indicate caller is freeing extents*/
 
#define XFS_ALLOC_SET_ASIDE(mp)   (4 + ((mp)->m_sb.sb_agcount * 4))
 
#define XFS_ALLOC_AG_MAX_USABLE(mp)   ((mp)->m_sb.sb_agblocks - XFS_BB_TO_FSB(mp, XFS_FSS_TO_BB(mp, 4)) - 7)
 
#define XFS_ALLOC_USERDATA   1 /* allocation is for user data*/
 
#define XFS_ALLOC_INITIAL_USER_DATA   2 /* special case start of file */
 

Typedefs

typedef unsigned int xfs_alloctype_t
 
typedef struct xfs_alloc_arg xfs_alloc_arg_t
 

Functions

xfs_extlen_t xfs_alloc_longest_free_extent (struct xfs_mount *mp, struct xfs_perag *pag)
 
void xfs_alloc_compute_maxlevels (struct xfs_mount *mp)
 
int xfs_alloc_get_freelist (struct xfs_trans *tp, struct xfs_buf *agbp, xfs_agblock_t *bnop, int btreeblk)
 
void xfs_alloc_log_agf (struct xfs_trans *tp, struct xfs_buf *bp, int fields)
 
int xfs_alloc_pagf_init (struct xfs_mount *mp, struct xfs_trans *tp, xfs_agnumber_t agno, int flags)
 
int xfs_alloc_put_freelist (struct xfs_trans *tp, struct xfs_buf *agbp, struct xfs_buf *agflbp, xfs_agblock_t bno, int btreeblk)
 
int xfs_alloc_read_agf (struct xfs_mount *mp, struct xfs_trans *tp, xfs_agnumber_t agno, int flags, struct xfs_buf **bpp)
 
int xfs_alloc_vextent (xfs_alloc_arg_t *args)
 
int xfs_free_extent (struct xfs_trans *tp, xfs_fsblock_t bno, xfs_extlen_t len)
 
int xfs_alloc_lookup_le (struct xfs_btree_cur *cur, xfs_agblock_t bno, xfs_extlen_t len, int *stat)
 
int xfs_alloc_lookup_ge (struct xfs_btree_cur *cur, xfs_agblock_t bno, xfs_extlen_t len, int *stat)
 
int xfs_alloc_get_rec (struct xfs_btree_cur *cur, xfs_agblock_t *bno, xfs_extlen_t *len, int *stat)
 

Variables

struct workqueue_structxfs_alloc_wq
 

Macro Definition Documentation

#define XFS_ALLOC_AG_MAX_USABLE (   mp)    ((mp)->m_sb.sb_agblocks - XFS_BB_TO_FSB(mp, XFS_FSS_TO_BB(mp, 4)) - 7)

Definition at line 90 of file xfs_alloc.h.

#define XFS_ALLOC_FLAG_FREEING   0x00000002 /* indicate caller is freeing extents*/

Definition at line 56 of file xfs_alloc.h.

#define XFS_ALLOC_FLAG_TRYLOCK   0x00000001 /* use trylock for buffer locking */

Definition at line 55 of file xfs_alloc.h.

#define XFS_ALLOC_INITIAL_USER_DATA   2 /* special case start of file */

Definition at line 129 of file xfs_alloc.h.

#define XFS_ALLOC_SET_ASIDE (   mp)    (4 + ((mp)->m_sb.sb_agcount * 4))

Definition at line 76 of file xfs_alloc.h.

#define XFS_ALLOC_TYPES
Value:
{ XFS_ALLOCTYPE_ANY_AG, "ANY_AG" }, \
{ XFS_ALLOCTYPE_FIRST_AG, "FIRST_AG" }, \
{ XFS_ALLOCTYPE_START_AG, "START_AG" }, \
{ XFS_ALLOCTYPE_THIS_AG, "THIS_AG" }, \
{ XFS_ALLOCTYPE_START_BNO, "START_BNO" }, \
{ XFS_ALLOCTYPE_NEAR_BNO, "NEAR_BNO" }, \
{ XFS_ALLOCTYPE_THIS_BNO, "THIS_BNO" }

Definition at line 43 of file xfs_alloc.h.

#define XFS_ALLOC_USERDATA   1 /* allocation is for user data*/

Definition at line 128 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_ANY_AG   0x01 /* allocate anywhere, use rotor */

Definition at line 32 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_FIRST_AG   0x02 /* ... start at ag 0 */

Definition at line 33 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_NEAR_BNO   0x20 /* in this a.g. and near this block */

Definition at line 37 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_START_AG   0x04 /* anywhere, start in this a.g. */

Definition at line 34 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_START_BNO   0x10 /* near this block else anywhere */

Definition at line 36 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_THIS_AG   0x08 /* anywhere in this a.g. */

Definition at line 35 of file xfs_alloc.h.

#define XFS_ALLOCTYPE_THIS_BNO   0x40 /* at exactly this block */

Definition at line 38 of file xfs_alloc.h.

Typedef Documentation

typedef unsigned int xfs_alloctype_t

Definition at line 41 of file xfs_alloc.h.

Function Documentation

void xfs_alloc_compute_maxlevels ( struct xfs_mount *  mp)
int xfs_alloc_get_freelist ( struct xfs_trans *  tp,
struct xfs_buf agbp,
xfs_agblock_t bnop,
int  btreeblk 
)
int xfs_alloc_get_rec ( struct xfs_btree_cur cur,
xfs_agblock_t bno,
xfs_extlen_t len,
int stat 
)

Definition at line 120 of file xfs_alloc.c.

void xfs_alloc_log_agf ( struct xfs_trans *  tp,
struct xfs_buf bp,
int  fields 
)
xfs_extlen_t xfs_alloc_longest_free_extent ( struct xfs_mount *  mp,
struct xfs_perag pag 
)

Definition at line 1729 of file xfs_alloc.c.

int xfs_alloc_lookup_ge ( struct xfs_btree_cur cur,
xfs_agblock_t  bno,
xfs_extlen_t  len,
int stat 
)

Definition at line 71 of file xfs_alloc.c.

int xfs_alloc_lookup_le ( struct xfs_btree_cur cur,
xfs_agblock_t  bno,
xfs_extlen_t  len,
int stat 
)

Definition at line 87 of file xfs_alloc.c.

int xfs_alloc_pagf_init ( struct xfs_mount *  mp,
struct xfs_trans *  tp,
xfs_agnumber_t  agno,
int  flags 
)
int xfs_alloc_put_freelist ( struct xfs_trans *  tp,
struct xfs_buf agbp,
struct xfs_buf agflbp,
xfs_agblock_t  bno,
int  btreeblk 
)
int xfs_alloc_read_agf ( struct xfs_mount *  mp,
struct xfs_trans *  tp,
xfs_agnumber_t  agno,
int  flags,
struct xfs_buf **  bpp 
)

Definition at line 2151 of file xfs_alloc.c.

int xfs_alloc_vextent ( xfs_alloc_arg_t args)

Definition at line 2211 of file xfs_alloc.c.

int xfs_free_extent ( struct xfs_trans *  tp,
xfs_fsblock_t  bno,
xfs_extlen_t  len 
)

Variable Documentation

struct workqueue_struct* xfs_alloc_wq

Definition at line 38 of file xfs_alloc.c.