[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>
This commit is contained in:
Nathan Scott
2005-11-02 14:38:42 +11:00
parent 61c1e689fb
commit a844f4510d
93 changed files with 1568 additions and 3094 deletions

View File

@@ -40,18 +40,8 @@ struct xfs_trans;
/*
* Allocation parameters for inode allocation.
*/
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_INODES)
int xfs_ialloc_inodes(struct xfs_mount *mp);
#define XFS_IALLOC_INODES(mp) xfs_ialloc_inodes(mp)
#else
#define XFS_IALLOC_INODES(mp) ((mp)->m_ialloc_inos)
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_BLOCKS)
xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp);
#define XFS_IALLOC_BLOCKS(mp) xfs_ialloc_blocks(mp)
#else
#define XFS_IALLOC_BLOCKS(mp) ((mp)->m_ialloc_blks)
#endif
#define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos
#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks
/*
* 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);
/*
* Make an inode pointer out of the buffer/offset.
*/
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MAKE_IPTR)
struct xfs_dinode *xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o);
#define XFS_MAKE_IPTR(mp,b,o) xfs_make_iptr(mp,b,o)
#else
#define XFS_MAKE_IPTR(mp,b,o) \
((xfs_dinode_t *)(xfs_buf_offset(b, (o) << (mp)->m_sb.sb_inodelog)))
#endif
static inline struct xfs_dinode *
xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o)
{
return (xfs_dinode_t *)
(xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog));
}
/*
* Find a free (set) bit in the inode bitmask.
*/
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_FIND_FREE)
int xfs_ialloc_find_free(xfs_inofree_t *fp);
#define XFS_IALLOC_FIND_FREE(fp) xfs_ialloc_find_free(fp)
#else
#define XFS_IALLOC_FIND_FREE(fp) xfs_lowbit64(*(fp))
#endif
static inline int xfs_ialloc_find_free(xfs_inofree_t *fp)
{
return xfs_lowbit64(*fp);
}
#ifdef __KERNEL__
/*
* Prototypes for visible xfs_ialloc.c routines.
*/
/*
* Allocate an inode on disk.
* Mode is used to tell whether the new inode will need space, and whether