aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-01 22:38:42 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 22:38:42 -0500
commita844f4510dce23c07f3923cb42138f5fdd745017 (patch)
treeffb37e9e60f02d5e92bd69bb53b568e1c991c17f /fs/xfs/xfs_ialloc.h
parent61c1e689fbde7cb50a76262bba190715d86beab6 (diff)
[XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot.
SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_ialloc.h')
-rw-r--r--fs/xfs/xfs_ialloc.h40
1 files changed, 12 insertions, 28 deletions
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h
index db6d0015cecf..fab660dd6d1b 100644
--- a/fs/xfs/xfs_ialloc.h
+++ b/fs/xfs/xfs_ialloc.h
@@ -40,18 +40,8 @@ struct xfs_trans;
40/* 40/*
41 * Allocation parameters for inode allocation. 41 * Allocation parameters for inode allocation.
42 */ 42 */
43#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_INODES) 43#define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos
44int xfs_ialloc_inodes(struct xfs_mount *mp); 44#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks
45#define XFS_IALLOC_INODES(mp) xfs_ialloc_inodes(mp)
46#else
47#define XFS_IALLOC_INODES(mp) ((mp)->m_ialloc_inos)
48#endif
49#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_BLOCKS)
50xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp);
51#define XFS_IALLOC_BLOCKS(mp) xfs_ialloc_blocks(mp)
52#else
53#define XFS_IALLOC_BLOCKS(mp) ((mp)->m_ialloc_blks)
54#endif
55 45
56/* 46/*
57 * For small block file systems, move inodes in clusters of this size. 47 * For small block file systems, move inodes in clusters of this size.
@@ -67,31 +57,25 @@ xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp);
67/* 57/*
68 * Make an inode pointer out of the buffer/offset. 58 * Make an inode pointer out of the buffer/offset.
69 */ 59 */
70#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MAKE_IPTR)
71struct xfs_dinode *xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o);
72#define XFS_MAKE_IPTR(mp,b,o) xfs_make_iptr(mp,b,o) 60#define XFS_MAKE_IPTR(mp,b,o) xfs_make_iptr(mp,b,o)
73#else 61static inline struct xfs_dinode *
74#define XFS_MAKE_IPTR(mp,b,o) \ 62xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o)
75 ((xfs_dinode_t *)(xfs_buf_offset(b, (o) << (mp)->m_sb.sb_inodelog))) 63{
76#endif 64 return (xfs_dinode_t *)
65 (xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog));
66}
77 67
78/* 68/*
79 * Find a free (set) bit in the inode bitmask. 69 * Find a free (set) bit in the inode bitmask.
80 */ 70 */
81#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_FIND_FREE)
82int xfs_ialloc_find_free(xfs_inofree_t *fp);
83#define XFS_IALLOC_FIND_FREE(fp) xfs_ialloc_find_free(fp) 71#define XFS_IALLOC_FIND_FREE(fp) xfs_ialloc_find_free(fp)
84#else 72static inline int xfs_ialloc_find_free(xfs_inofree_t *fp)
85#define XFS_IALLOC_FIND_FREE(fp) xfs_lowbit64(*(fp)) 73{
86#endif 74 return xfs_lowbit64(*fp);
75}
87 76
88 77
89#ifdef __KERNEL__ 78#ifdef __KERNEL__
90
91/*
92 * Prototypes for visible xfs_ialloc.c routines.
93 */
94
95/* 79/*
96 * Allocate an inode on disk. 80 * Allocate an inode on disk.
97 * Mode is used to tell whether the new inode will need space, and whether 81 * Mode is used to tell whether the new inode will need space, and whether