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_inode.h File Reference

Go to the source code of this file.

Data Structures

struct  xfs_ext_irec
 
struct  xfs_ifork
 
struct  xfs_imap
 
struct  xfs_ictimestamp
 
struct  xfs_icdinode
 

Macros

#define XFS_DATA_FORK   0
 
#define XFS_ATTR_FORK   1
 
#define XFS_IEXT_BUFSZ   4096
 
#define XFS_LINEAR_EXTS   (XFS_IEXT_BUFSZ / (uint)sizeof(xfs_bmbt_rec_t))
 
#define XFS_INLINE_EXTS   2
 
#define XFS_INLINE_DATA   32
 
#define XFS_ICHGTIME_MOD   0x1 /* data fork modification timestamp */
 
#define XFS_ICHGTIME_CHG   0x2 /* inode field change timestamp */
 
#define XFS_IFINLINE   0x01 /* Inline data is read in */
 
#define XFS_IFEXTENTS   0x02 /* All extent pointers are read in */
 
#define XFS_IFBROOT   0x04 /* i_broot points to the bmap b-tree root */
 
#define XFS_IFEXTIREC   0x08 /* Indirection array of extent blocks */
 
#define XFS_IFORK_Q(ip)   ((ip)->i_d.di_forkoff != 0)
 
#define XFS_IFORK_BOFF(ip)   ((int)((ip)->i_d.di_forkoff << 3))
 
#define XFS_IFORK_PTR(ip, w)
 
#define XFS_IFORK_DSIZE(ip)
 
#define XFS_IFORK_ASIZE(ip)
 
#define XFS_IFORK_SIZE(ip, w)
 
#define XFS_IFORK_FORMAT(ip, w)
 
#define XFS_IFORK_FMT_SET(ip, w, n)
 
#define XFS_IFORK_NEXTENTS(ip, w)
 
#define XFS_IFORK_NEXT_SET(ip, w, n)
 
#define XFS_IFORK_MAXEXT(ip, w)   (XFS_IFORK_SIZE(ip, w) / sizeof(xfs_bmbt_rec_t))
 
#define XFS_IGET_CREATE   0x1
 
#define XFS_IGET_UNTRUSTED   0x2
 
#define XFS_IGET_DONTCACHE   0x4
 
#define xfs_ipincount(ip)   ((unsigned int) atomic_read(&ip->i_pincount))
 
#define xfs_inobp_check(mp, bp)
 

Typedefs

typedef struct xfs_ext_irec xfs_ext_irec_t
 
typedef struct xfs_ifork xfs_ifork_t
 
typedef struct xfs_ictimestamp xfs_ictimestamp_t
 
typedef struct xfs_icdinode xfs_icdinode_t
 

Functions

int xfs_imap_to_bp (struct xfs_mount *, struct xfs_trans *, struct xfs_imap *, struct xfs_dinode **, struct xfs_buf **, uint, uint)
 
int xfs_iread (struct xfs_mount *, struct xfs_trans *, struct xfs_inode *, uint)
 
void xfs_dinode_to_disk (struct xfs_dinode *, struct xfs_icdinode *)
 
void xfs_idestroy_fork (struct xfs_inode *, int)
 
void xfs_idata_realloc (struct xfs_inode *, int, int)
 
void xfs_iroot_realloc (struct xfs_inode *, int, int)
 
int xfs_iread_extents (struct xfs_trans *, struct xfs_inode *, int)
 
int xfs_iextents_copy (struct xfs_inode *, xfs_bmbt_rec_t *, int)
 
xfs_bmbt_rec_host_txfs_iext_get_ext (xfs_ifork_t *, xfs_extnum_t)
 
void xfs_iext_insert (xfs_inode_t *, xfs_extnum_t, xfs_extnum_t, xfs_bmbt_irec_t *, int)
 
void xfs_iext_add (xfs_ifork_t *, xfs_extnum_t, int)
 
void xfs_iext_add_indirect_multi (xfs_ifork_t *, int, xfs_extnum_t, int)
 
void xfs_iext_remove (xfs_inode_t *, xfs_extnum_t, int, int)
 
void xfs_iext_remove_inline (xfs_ifork_t *, xfs_extnum_t, int)
 
void xfs_iext_remove_direct (xfs_ifork_t *, xfs_extnum_t, int)
 
void xfs_iext_remove_indirect (xfs_ifork_t *, xfs_extnum_t, int)
 
void xfs_iext_realloc_direct (xfs_ifork_t *, int)
 
void xfs_iext_direct_to_inline (xfs_ifork_t *, xfs_extnum_t)
 
void xfs_iext_inline_to_direct (xfs_ifork_t *, int)
 
void xfs_iext_destroy (xfs_ifork_t *)
 
xfs_bmbt_rec_host_txfs_iext_bno_to_ext (xfs_ifork_t *, xfs_fileoff_t, int *)
 
xfs_ext_irec_txfs_iext_bno_to_irec (xfs_ifork_t *, xfs_fileoff_t, int *)
 
xfs_ext_irec_txfs_iext_idx_to_irec (xfs_ifork_t *, xfs_extnum_t *, int *, int)
 
void xfs_iext_irec_init (xfs_ifork_t *)
 
xfs_ext_irec_txfs_iext_irec_new (xfs_ifork_t *, int)
 
void xfs_iext_irec_remove (xfs_ifork_t *, int)
 
void xfs_iext_irec_compact (xfs_ifork_t *)
 
void xfs_iext_irec_compact_pages (xfs_ifork_t *)
 
void xfs_iext_irec_compact_full (xfs_ifork_t *)
 
void xfs_iext_irec_update_extoffs (xfs_ifork_t *, int, int)
 

Variables

struct kmem_zonexfs_ifork_zone
 
struct kmem_zonexfs_inode_zone
 
struct kmem_zonexfs_ili_zone
 

Macro Definition Documentation

#define XFS_ATTR_FORK   1

Definition at line 29 of file xfs_inode.h.

#define XFS_DATA_FORK   0

Definition at line 28 of file xfs_inode.h.

#define XFS_ICHGTIME_CHG   0x2 /* inode field change timestamp */

Definition at line 159 of file xfs_inode.h.

#define XFS_ICHGTIME_MOD   0x1 /* data fork modification timestamp */

Definition at line 158 of file xfs_inode.h.

#define XFS_IEXT_BUFSZ   4096

Definition at line 59 of file xfs_inode.h.

#define XFS_IFBROOT   0x04 /* i_broot points to the bmap b-tree root */

Definition at line 166 of file xfs_inode.h.

#define XFS_IFEXTENTS   0x02 /* All extent pointers are read in */

Definition at line 165 of file xfs_inode.h.

#define XFS_IFEXTIREC   0x08 /* Indirection array of extent blocks */

Definition at line 167 of file xfs_inode.h.

#define XFS_IFINLINE   0x01 /* Inline data is read in */

Definition at line 164 of file xfs_inode.h.

#define XFS_IFORK_ASIZE (   ip)
Value:
XFS_LITINO((ip)->i_mount) - XFS_IFORK_BOFF(ip) : \
0)

Definition at line 184 of file xfs_inode.h.

#define XFS_IFORK_BOFF (   ip)    ((int)((ip)->i_d.di_forkoff << 3))

Definition at line 174 of file xfs_inode.h.

#define XFS_IFORK_DSIZE (   ip)
Value:
XFS_IFORK_BOFF(ip) : \
XFS_LITINO((ip)->i_mount))

Definition at line 180 of file xfs_inode.h.

#define XFS_IFORK_FMT_SET (   ip,
  w,
  n 
)
Value:
((w) == XFS_DATA_FORK ? \
((ip)->i_d.di_format = (n)) : \
((ip)->i_d.di_aformat = (n)))

Definition at line 196 of file xfs_inode.h.

#define XFS_IFORK_FORMAT (   ip,
  w 
)
Value:
((w) == XFS_DATA_FORK ? \
(ip)->i_d.di_format : \
(ip)->i_d.di_aformat)

Definition at line 192 of file xfs_inode.h.

#define XFS_IFORK_MAXEXT (   ip,
  w 
)    (XFS_IFORK_SIZE(ip, w) / sizeof(xfs_bmbt_rec_t))

Definition at line 208 of file xfs_inode.h.

#define XFS_IFORK_NEXT_SET (   ip,
  w,
  n 
)
Value:
((w) == XFS_DATA_FORK ? \
((ip)->i_d.di_nextents = (n)) : \
((ip)->i_d.di_anextents = (n)))

Definition at line 204 of file xfs_inode.h.

#define XFS_IFORK_NEXTENTS (   ip,
  w 
)
Value:
((w) == XFS_DATA_FORK ? \
(ip)->i_d.di_nextents : \
(ip)->i_d.di_anextents)

Definition at line 200 of file xfs_inode.h.

#define XFS_IFORK_PTR (   ip,
  w 
)
Value:
((w) == XFS_DATA_FORK ? \
&(ip)->i_df : \
(ip)->i_afp)

Definition at line 176 of file xfs_inode.h.

#define XFS_IFORK_Q (   ip)    ((ip)->i_d.di_forkoff != 0)

Definition at line 173 of file xfs_inode.h.

#define XFS_IFORK_SIZE (   ip,
  w 
)
Value:
((w) == XFS_DATA_FORK ? \
XFS_IFORK_ASIZE(ip))

Definition at line 188 of file xfs_inode.h.

#define XFS_IGET_CREATE   0x1

Definition at line 554 of file xfs_inode.h.

#define XFS_IGET_DONTCACHE   0x4

Definition at line 556 of file xfs_inode.h.

#define XFS_IGET_UNTRUSTED   0x2

Definition at line 555 of file xfs_inode.h.

#define XFS_INLINE_DATA   32

Definition at line 62 of file xfs_inode.h.

#define XFS_INLINE_EXTS   2

Definition at line 61 of file xfs_inode.h.

#define xfs_inobp_check (   mp,
  bp 
)

Definition at line 600 of file xfs_inode.h.

#define xfs_ipincount (   ip)    ((unsigned int) atomic_read(&ip->i_pincount))

Definition at line 595 of file xfs_inode.h.

#define XFS_LINEAR_EXTS   (XFS_IEXT_BUFSZ / (uint)sizeof(xfs_bmbt_rec_t))

Definition at line 60 of file xfs_inode.h.

Typedef Documentation

Function Documentation

void xfs_dinode_to_disk ( struct xfs_dinode ,
struct xfs_icdinode  
)
void xfs_idata_realloc ( struct xfs_inode *  ,
int  ,
int   
)
void xfs_idestroy_fork ( struct xfs_inode *  ,
int   
)
void xfs_iext_add ( xfs_ifork_t ,
xfs_extnum_t  ,
int   
)

Definition at line 2696 of file xfs_inode.c.

void xfs_iext_add_indirect_multi ( xfs_ifork_t ,
int  ,
xfs_extnum_t  ,
int   
)

Definition at line 2809 of file xfs_inode.c.

xfs_bmbt_rec_host_t* xfs_iext_bno_to_ext ( xfs_ifork_t ,
xfs_fileoff_t  ,
int  
)
xfs_ext_irec_t* xfs_iext_bno_to_irec ( xfs_ifork_t ,
xfs_fileoff_t  ,
int  
)

Definition at line 3361 of file xfs_inode.c.

void xfs_iext_destroy ( xfs_ifork_t )

Definition at line 3263 of file xfs_inode.c.

void xfs_iext_direct_to_inline ( xfs_ifork_t ,
xfs_extnum_t   
)

Definition at line 3163 of file xfs_inode.c.

xfs_bmbt_rec_host_t* xfs_iext_get_ext ( xfs_ifork_t ,
xfs_extnum_t   
)

Definition at line 2637 of file xfs_inode.c.

xfs_ext_irec_t* xfs_iext_idx_to_irec ( xfs_ifork_t ,
xfs_extnum_t ,
int ,
int   
)

Definition at line 3402 of file xfs_inode.c.

void xfs_iext_inline_to_direct ( xfs_ifork_t ,
int   
)

Definition at line 3190 of file xfs_inode.c.

void xfs_iext_insert ( xfs_inode_t *  ,
xfs_extnum_t  ,
xfs_extnum_t  ,
xfs_bmbt_irec_t ,
int   
)

Definition at line 2665 of file xfs_inode.c.

void xfs_iext_irec_compact ( xfs_ifork_t )

Definition at line 3583 of file xfs_inode.c.

void xfs_iext_irec_compact_full ( xfs_ifork_t )
void xfs_iext_irec_compact_pages ( xfs_ifork_t )

Definition at line 3609 of file xfs_inode.c.

void xfs_iext_irec_init ( xfs_ifork_t )

Definition at line 3460 of file xfs_inode.c.

xfs_ext_irec_t* xfs_iext_irec_new ( xfs_ifork_t ,
int   
)

Definition at line 3495 of file xfs_inode.c.

void xfs_iext_irec_remove ( xfs_ifork_t ,
int   
)

Definition at line 3534 of file xfs_inode.c.

void xfs_iext_irec_update_extoffs ( xfs_ifork_t ,
int  ,
int   
)

Definition at line 3650 of file xfs_inode.c.

void xfs_iext_realloc_direct ( xfs_ifork_t ,
int   
)

Definition at line 3103 of file xfs_inode.c.

void xfs_iext_remove ( xfs_inode_t *  ,
xfs_extnum_t  ,
int  ,
int   
)

Definition at line 2917 of file xfs_inode.c.

void xfs_iext_remove_direct ( xfs_ifork_t ,
xfs_extnum_t  ,
int   
)

Definition at line 2987 of file xfs_inode.c.

void xfs_iext_remove_indirect ( xfs_ifork_t ,
xfs_extnum_t  ,
int   
)

Definition at line 3039 of file xfs_inode.c.

void xfs_iext_remove_inline ( xfs_ifork_t ,
xfs_extnum_t  ,
int   
)

Definition at line 2950 of file xfs_inode.c.

int xfs_iextents_copy ( struct xfs_inode *  ,
xfs_bmbt_rec_t ,
int   
)
int xfs_imap_to_bp ( struct xfs_mount *  ,
struct xfs_trans *  ,
struct xfs_imap ,
struct xfs_dinode **  ,
struct xfs_buf **  ,
uint  ,
uint   
)

Definition at line 144 of file xfs_inode.c.

int xfs_iread ( struct xfs_mount *  ,
struct xfs_trans *  ,
struct xfs_inode *  ,
uint   
)
int xfs_iread_extents ( struct xfs_trans *  ,
struct xfs_inode *  ,
int   
)
void xfs_iroot_realloc ( struct xfs_inode *  ,
int  ,
int   
)

Variable Documentation

struct kmem_zone* xfs_ifork_zone

Definition at line 49 of file xfs_inode.c.

struct kmem_zone* xfs_ili_zone

Definition at line 35 of file xfs_inode_item.c.

struct kmem_zone* xfs_inode_zone

Definition at line 50 of file xfs_inode.c.