aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-03-13 21:18:19 -0500
committerNathan Scott <nathans@sgi.com>2006-03-13 21:18:19 -0500
commit8758280fcc6129be89503efe93bb59eaf2f85d28 (patch)
tree395246120b571385c1f3efad773b83a932d008da /fs/xfs/xfs_vfsops.c
parent8d280b98cfe3c0b69c37d355218975c1c0279bb0 (diff)
[XFS] Cleanup the use of zones/slabs, more consistent and allows flags to
be passed. SGI-PV: 949073 SGI-Modid: xfs-linux-melb:xfs-kern:25122a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r--fs/xfs/xfs_vfsops.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 2e1045837881..5dd84fe609cc 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -77,11 +77,12 @@ xfs_init(void)
77 "xfs_bmap_free_item"); 77 "xfs_bmap_free_item");
78 xfs_btree_cur_zone = kmem_zone_init(sizeof(xfs_btree_cur_t), 78 xfs_btree_cur_zone = kmem_zone_init(sizeof(xfs_btree_cur_t),
79 "xfs_btree_cur"); 79 "xfs_btree_cur");
80 xfs_inode_zone = kmem_zone_init(sizeof(xfs_inode_t), "xfs_inode");
81 xfs_trans_zone = kmem_zone_init(sizeof(xfs_trans_t), "xfs_trans"); 80 xfs_trans_zone = kmem_zone_init(sizeof(xfs_trans_t), "xfs_trans");
82 xfs_da_state_zone = 81 xfs_da_state_zone =
83 kmem_zone_init(sizeof(xfs_da_state_t), "xfs_da_state"); 82 kmem_zone_init(sizeof(xfs_da_state_t), "xfs_da_state");
84 xfs_dabuf_zone = kmem_zone_init(sizeof(xfs_dabuf_t), "xfs_dabuf"); 83 xfs_dabuf_zone = kmem_zone_init(sizeof(xfs_dabuf_t), "xfs_dabuf");
84 xfs_ifork_zone = kmem_zone_init(sizeof(xfs_ifork_t), "xfs_ifork");
85 xfs_acl_zone_init(xfs_acl_zone, "xfs_acl");
85 86
86 /* 87 /*
87 * The size of the zone allocated buf log item is the maximum 88 * The size of the zone allocated buf log item is the maximum
@@ -93,17 +94,30 @@ xfs_init(void)
93 (((XFS_MAX_BLOCKSIZE / XFS_BLI_CHUNK) / 94 (((XFS_MAX_BLOCKSIZE / XFS_BLI_CHUNK) /
94 NBWORD) * sizeof(int))), 95 NBWORD) * sizeof(int))),
95 "xfs_buf_item"); 96 "xfs_buf_item");
96 xfs_efd_zone = kmem_zone_init((sizeof(xfs_efd_log_item_t) + 97 xfs_efd_zone =
97 ((XFS_EFD_MAX_FAST_EXTENTS - 1) * sizeof(xfs_extent_t))), 98 kmem_zone_init((sizeof(xfs_efd_log_item_t) +
99 ((XFS_EFD_MAX_FAST_EXTENTS - 1) *
100 sizeof(xfs_extent_t))),
98 "xfs_efd_item"); 101 "xfs_efd_item");
99 xfs_efi_zone = kmem_zone_init((sizeof(xfs_efi_log_item_t) + 102 xfs_efi_zone =
100 ((XFS_EFI_MAX_FAST_EXTENTS - 1) * sizeof(xfs_extent_t))), 103 kmem_zone_init((sizeof(xfs_efi_log_item_t) +
104 ((XFS_EFI_MAX_FAST_EXTENTS - 1) *
105 sizeof(xfs_extent_t))),
101 "xfs_efi_item"); 106 "xfs_efi_item");
102 xfs_ifork_zone = kmem_zone_init(sizeof(xfs_ifork_t), "xfs_ifork"); 107
103 xfs_ili_zone = kmem_zone_init(sizeof(xfs_inode_log_item_t), "xfs_ili"); 108 /*
104 xfs_chashlist_zone = kmem_zone_init(sizeof(xfs_chashlist_t), 109 * These zones warrant special memory allocator hints
105 "xfs_chashlist"); 110 */
106 xfs_acl_zone_init(xfs_acl_zone, "xfs_acl"); 111 xfs_inode_zone =
112 kmem_zone_init_flags(sizeof(xfs_inode_t), "xfs_inode",
113 KM_ZONE_HWALIGN | KM_ZONE_RECLAIM |
114 KM_ZONE_SPREAD, NULL);
115 xfs_ili_zone =
116 kmem_zone_init_flags(sizeof(xfs_inode_log_item_t), "xfs_ili",
117 KM_ZONE_SPREAD, NULL);
118 xfs_chashlist_zone =
119 kmem_zone_init_flags(sizeof(xfs_chashlist_t), "xfs_chashlist",
120 KM_ZONE_SPREAD, NULL);
107 121
108 /* 122 /*
109 * Allocate global trace buffers. 123 * Allocate global trace buffers.