aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_ialloc.h7
-rw-r--r--fs/xfs/xfs_mount.c11
2 files changed, 5 insertions, 13 deletions
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h
index 97f4040931ca..4e30ec1d13bc 100644
--- a/fs/xfs/xfs_ialloc.h
+++ b/fs/xfs/xfs_ialloc.h
@@ -30,14 +30,9 @@ struct xfs_trans;
30#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks 30#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks
31 31
32/* 32/*
33 * For small block file systems, move inodes in clusters of this size. 33 * Move inodes in clusters of this size.
34 * When we don't have a lot of memory, however, we go a bit smaller
35 * to reduce the number of AGI and ialloc btree blocks we need to keep
36 * around for xfs_dilocate(). We choose which one to use in
37 * xfs_mount_int().
38 */ 34 */
39#define XFS_INODE_BIG_CLUSTER_SIZE 8192 35#define XFS_INODE_BIG_CLUSTER_SIZE 8192
40#define XFS_INODE_SMALL_CLUSTER_SIZE 4096
41#define XFS_INODE_CLUSTER_SIZE(mp) (mp)->m_inode_cluster_size 36#define XFS_INODE_CLUSTER_SIZE(mp) (mp)->m_inode_cluster_size
42 37
43/* 38/*
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 4458e706b1c6..cfe4de5def89 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -885,15 +885,12 @@ xfs_mountfs(
885 mp->m_writeio_blocks = 1 << (mp->m_writeio_log - sbp->sb_blocklog); 885 mp->m_writeio_blocks = 1 << (mp->m_writeio_log - sbp->sb_blocklog);
886 886
887 /* 887 /*
888 * Set the inode cluster size based on the physical memory 888 * Set the inode cluster size.
889 * size. This may still be overridden by the file system 889 * This may still be overridden by the file system
890 * block size if it is larger than the chosen cluster size. 890 * block size if it is larger than the chosen cluster size.
891 */ 891 */
892 if (xfs_physmem <= btoc(32 * 1024 * 1024)) { /* <= 32 MB */ 892 mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE;
893 mp->m_inode_cluster_size = XFS_INODE_SMALL_CLUSTER_SIZE; 893
894 } else {
895 mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE;
896 }
897 /* 894 /*
898 * Set whether we're using inode alignment. 895 * Set whether we're using inode alignment.
899 */ 896 */