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

Go to the source code of this file.

Macros

#define XFS_MAX_RTEXTSIZE   (1024 * 1024 * 1024) /* 1GB */
 
#define XFS_DFL_RTEXTSIZE   (64 * 1024) /* 64kB */
 
#define XFS_MIN_RTEXTSIZE   (4 * 1024) /* 4kB */
 
#define XFS_NBBYLOG   3 /* log2(NBBY) */
 
#define XFS_WORDLOG   2 /* log2(sizeof(xfs_rtword_t)) */
 
#define XFS_NBWORDLOG   (XFS_NBBYLOG + XFS_WORDLOG)
 
#define XFS_NBWORD   (1 << XFS_NBWORDLOG)
 
#define XFS_WORDMASK   ((1 << XFS_WORDLOG) - 1)
 
#define XFS_BLOCKSIZE(mp)   ((mp)->m_sb.sb_blocksize)
 
#define XFS_BLOCKMASK(mp)   ((mp)->m_blockmask)
 
#define XFS_BLOCKWSIZE(mp)   ((mp)->m_blockwsize)
 
#define XFS_BLOCKWMASK(mp)   ((mp)->m_blockwmask)
 
#define XFS_SUMOFFS(mp, ls, bb)   ((int)((ls) * (mp)->m_sb.sb_rbmblocks + (bb)))
 
#define XFS_SUMOFFSTOBLOCK(mp, s)   (((s) * (uint)sizeof(xfs_suminfo_t)) >> (mp)->m_sb.sb_blocklog)
 
#define XFS_SUMPTR(mp, bp, so)
 
#define XFS_BITTOBLOCK(mp, bi)   ((bi) >> (mp)->m_blkbit_log)
 
#define XFS_BLOCKTOBIT(mp, bb)   ((bb) << (mp)->m_blkbit_log)
 
#define XFS_BITTOWORD(mp, bi)   ((int)(((bi) >> XFS_NBWORDLOG) & XFS_BLOCKWMASK(mp)))
 
#define XFS_RTMIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define XFS_RTMAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define XFS_RTLOBIT(w)   xfs_lowbit32(w)
 
#define XFS_RTHIBIT(w)   xfs_highbit32(w)
 
#define XFS_RTBLOCKLOG(b)   xfs_highbit32(b)
 

Macro Definition Documentation

#define XFS_BITTOBLOCK (   mp,
  bi 
)    ((bi) >> (mp)->m_blkbit_log)

Definition at line 53 of file xfs_rtalloc.h.

#define XFS_BITTOWORD (   mp,
  bi 
)    ((int)(((bi) >> XFS_NBWORDLOG) & XFS_BLOCKWMASK(mp)))

Definition at line 55 of file xfs_rtalloc.h.

#define XFS_BLOCKMASK (   mp)    ((mp)->m_blockmask)

Definition at line 39 of file xfs_rtalloc.h.

#define XFS_BLOCKSIZE (   mp)    ((mp)->m_sb.sb_blocksize)

Definition at line 38 of file xfs_rtalloc.h.

#define XFS_BLOCKTOBIT (   mp,
  bb 
)    ((bb) << (mp)->m_blkbit_log)

Definition at line 54 of file xfs_rtalloc.h.

#define XFS_BLOCKWMASK (   mp)    ((mp)->m_blockwmask)

Definition at line 41 of file xfs_rtalloc.h.

#define XFS_BLOCKWSIZE (   mp)    ((mp)->m_blockwsize)

Definition at line 40 of file xfs_rtalloc.h.

#define XFS_DFL_RTEXTSIZE   (64 * 1024) /* 64kB */

Definition at line 26 of file xfs_rtalloc.h.

#define XFS_MAX_RTEXTSIZE   (1024 * 1024 * 1024) /* 1GB */

Definition at line 25 of file xfs_rtalloc.h.

#define XFS_MIN_RTEXTSIZE   (4 * 1024) /* 4kB */

Definition at line 27 of file xfs_rtalloc.h.

#define XFS_NBBYLOG   3 /* log2(NBBY) */

Definition at line 32 of file xfs_rtalloc.h.

#define XFS_NBWORD   (1 << XFS_NBWORDLOG)

Definition at line 35 of file xfs_rtalloc.h.

#define XFS_NBWORDLOG   (XFS_NBBYLOG + XFS_WORDLOG)

Definition at line 34 of file xfs_rtalloc.h.

#define XFS_RTBLOCKLOG (   b)    xfs_highbit32(b)

Definition at line 67 of file xfs_rtalloc.h.

#define XFS_RTHIBIT (   w)    xfs_highbit32(w)

Definition at line 62 of file xfs_rtalloc.h.

#define XFS_RTLOBIT (   w)    xfs_lowbit32(w)

Definition at line 61 of file xfs_rtalloc.h.

#define XFS_RTMAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 59 of file xfs_rtalloc.h.

#define XFS_RTMIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 58 of file xfs_rtalloc.h.

#define XFS_SUMOFFS (   mp,
  ls,
  bb 
)    ((int)((ls) * (mp)->m_sb.sb_rbmblocks + (bb)))

Definition at line 46 of file xfs_rtalloc.h.

#define XFS_SUMOFFSTOBLOCK (   mp,
  s 
)    (((s) * (uint)sizeof(xfs_suminfo_t)) >> (mp)->m_sb.sb_blocklog)

Definition at line 47 of file xfs_rtalloc.h.

#define XFS_SUMPTR (   mp,
  bp,
  so 
)
Value:
((xfs_suminfo_t *)((bp)->b_addr + \
(((so) * (uint)sizeof(xfs_suminfo_t)) & XFS_BLOCKMASK(mp))))

Definition at line 49 of file xfs_rtalloc.h.

#define XFS_WORDLOG   2 /* log2(sizeof(xfs_rtword_t)) */

Definition at line 33 of file xfs_rtalloc.h.

#define XFS_WORDMASK   ((1 << XFS_WORDLOG) - 1)

Definition at line 36 of file xfs_rtalloc.h.