diff options
author | Ben Myers <bpm@sgi.com> | 2013-12-13 14:15:33 -0600 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-12-13 14:15:33 -0600 |
commit | 46f23adf78545c49591619a615edeec41ed5a549 (patch) | |
tree | d9bbcb204be3f9875b708a7ec847fc99a572f4f3 /fs/xfs/xfs_ialloc.h | |
parent | ffda4e83aa107ff55345dc583efdb24fca486fb5 (diff) | |
parent | f9e5abcfc5b299a988cf8f9d0ad11e03da14806b (diff) | |
download | linux-stable-46f23adf78545c49591619a615edeec41ed5a549.tar.gz linux-stable-46f23adf78545c49591619a615edeec41ed5a549.tar.bz2 linux-stable-46f23adf78545c49591619a615edeec41ed5a549.zip |
Merge branch 'xfs-factor-icluster-macros' into for-next
Diffstat (limited to 'fs/xfs/xfs_ialloc.h')
-rw-r--r-- | fs/xfs/xfs_ialloc.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index a8f76a5ff418..812365d17e67 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h @@ -25,17 +25,18 @@ struct xfs_mount; struct xfs_trans; struct xfs_btree_cur; -/* - * Allocation parameters for inode allocation. - */ -#define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos -#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks - -/* - * Move inodes in clusters of this size. - */ +/* Move inodes in clusters of this size */ #define XFS_INODE_BIG_CLUSTER_SIZE 8192 -#define XFS_INODE_CLUSTER_SIZE(mp) (mp)->m_inode_cluster_size + +/* Calculate and return the number of filesystem blocks per inode cluster */ +static inline int +xfs_icluster_size_fsb( + struct xfs_mount *mp) +{ + if (mp->m_sb.sb_blocksize >= mp->m_inode_cluster_size) + return 1; + return mp->m_inode_cluster_size >> mp->m_sb.sb_blocklog; +} /* * Make an inode pointer out of the buffer/offset. |