diff options
author | Ben Myers <bpm@sgi.com> | 2013-12-13 15:15:33 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-12-13 15:15:33 -0500 |
commit | 46f23adf78545c49591619a615edeec41ed5a549 (patch) | |
tree | d9bbcb204be3f9875b708a7ec847fc99a572f4f3 /fs/xfs/xfs_ialloc.h | |
parent | ffda4e83aa107ff55345dc583efdb24fca486fb5 (diff) | |
parent | f9e5abcfc5b299a988cf8f9d0ad11e03da14806b (diff) |
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; | |||
25 | struct xfs_trans; | 25 | struct xfs_trans; |
26 | struct xfs_btree_cur; | 26 | struct xfs_btree_cur; |
27 | 27 | ||
28 | /* | 28 | /* Move inodes in clusters of this size */ |
29 | * Allocation parameters for inode allocation. | ||
30 | */ | ||
31 | #define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos | ||
32 | #define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks | ||
33 | |||
34 | /* | ||
35 | * Move inodes in clusters of this size. | ||
36 | */ | ||
37 | #define XFS_INODE_BIG_CLUSTER_SIZE 8192 | 29 | #define XFS_INODE_BIG_CLUSTER_SIZE 8192 |
38 | #define XFS_INODE_CLUSTER_SIZE(mp) (mp)->m_inode_cluster_size | 30 | |
31 | /* Calculate and return the number of filesystem blocks per inode cluster */ | ||
32 | static inline int | ||
33 | xfs_icluster_size_fsb( | ||
34 | struct xfs_mount *mp) | ||
35 | { | ||
36 | if (mp->m_sb.sb_blocksize >= mp->m_inode_cluster_size) | ||
37 | return 1; | ||
38 | return mp->m_inode_cluster_size >> mp->m_sb.sb_blocklog; | ||
39 | } | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Make an inode pointer out of the buffer/offset. | 42 | * Make an inode pointer out of the buffer/offset. |