aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-08-20 19:30:07 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-13 19:57:04 -0400
commitce1d9ea621291ed5e985d6677278c6bb20d96a40 (patch)
tree5bd40bdd327745ab0e91fb181752062306147135
parent35dc0aa3c5e7391319754e0c19cdfc0a28eb5b25 (diff)
ocfs2: Prefix the ocfs2_extent_tree structure.
The members of the ocfs2_extent_tree structure gain a prefix of 'et_'. All users are updated. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
-rw-r--r--fs/ocfs2/alloc.c118
1 files changed, 61 insertions, 57 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index f2e35a8f0197..4ade2b259e6d 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -75,28 +75,30 @@ struct ocfs2_extent_tree_operations {
75}; 75};
76 76
77struct ocfs2_extent_tree { 77struct ocfs2_extent_tree {
78 enum ocfs2_extent_tree_type type; 78 enum ocfs2_extent_tree_type et_type;
79 struct ocfs2_extent_tree_operations *eops; 79 struct ocfs2_extent_tree_operations *et_ops;
80 struct buffer_head *root_bh; 80 struct buffer_head *et_root_bh;
81 struct ocfs2_extent_list *root_el; 81 struct ocfs2_extent_list *et_root_el;
82 void *private; 82 void *et_private;
83 unsigned int max_leaf_clusters; 83 unsigned int et_max_leaf_clusters;
84}; 84};
85 85
86static void ocfs2_dinode_set_last_eb_blk(struct ocfs2_extent_tree *et, 86static void ocfs2_dinode_set_last_eb_blk(struct ocfs2_extent_tree *et,
87 u64 blkno) 87 u64 blkno)
88{ 88{
89 struct ocfs2_dinode *di = (struct ocfs2_dinode *)et->root_bh->b_data; 89 struct ocfs2_dinode *di =
90 (struct ocfs2_dinode *)et->et_root_bh->b_data;
90 91
91 BUG_ON(et->type != OCFS2_DINODE_EXTENT); 92 BUG_ON(et->et_type != OCFS2_DINODE_EXTENT);
92 di->i_last_eb_blk = cpu_to_le64(blkno); 93 di->i_last_eb_blk = cpu_to_le64(blkno);
93} 94}
94 95
95static u64 ocfs2_dinode_get_last_eb_blk(struct ocfs2_extent_tree *et) 96static u64 ocfs2_dinode_get_last_eb_blk(struct ocfs2_extent_tree *et)
96{ 97{
97 struct ocfs2_dinode *di = (struct ocfs2_dinode *)et->root_bh->b_data; 98 struct ocfs2_dinode *di =
99 (struct ocfs2_dinode *)et->et_root_bh->b_data;
98 100
99 BUG_ON(et->type != OCFS2_DINODE_EXTENT); 101 BUG_ON(et->et_type != OCFS2_DINODE_EXTENT);
100 return le64_to_cpu(di->i_last_eb_blk); 102 return le64_to_cpu(di->i_last_eb_blk);
101} 103}
102 104
@@ -105,7 +107,7 @@ static void ocfs2_dinode_update_clusters(struct inode *inode,
105 u32 clusters) 107 u32 clusters)
106{ 108{
107 struct ocfs2_dinode *di = 109 struct ocfs2_dinode *di =
108 (struct ocfs2_dinode *)et->root_bh->b_data; 110 (struct ocfs2_dinode *)et->et_root_bh->b_data;
109 111
110 le32_add_cpu(&di->i_clusters, clusters); 112 le32_add_cpu(&di->i_clusters, clusters);
111 spin_lock(&OCFS2_I(inode)->ip_lock); 113 spin_lock(&OCFS2_I(inode)->ip_lock);
@@ -119,9 +121,9 @@ static int ocfs2_dinode_sanity_check(struct inode *inode,
119 int ret = 0; 121 int ret = 0;
120 struct ocfs2_dinode *di; 122 struct ocfs2_dinode *di;
121 123
122 BUG_ON(et->type != OCFS2_DINODE_EXTENT); 124 BUG_ON(et->et_type != OCFS2_DINODE_EXTENT);
123 125
124 di = (struct ocfs2_dinode *)et->root_bh->b_data; 126 di = (struct ocfs2_dinode *)et->et_root_bh->b_data;
125 if (!OCFS2_IS_VALID_DINODE(di)) { 127 if (!OCFS2_IS_VALID_DINODE(di)) {
126 ret = -EIO; 128 ret = -EIO;
127 ocfs2_error(inode->i_sb, 129 ocfs2_error(inode->i_sb,
@@ -143,7 +145,7 @@ static void ocfs2_xattr_value_set_last_eb_blk(struct ocfs2_extent_tree *et,
143 u64 blkno) 145 u64 blkno)
144{ 146{
145 struct ocfs2_xattr_value_root *xv = 147 struct ocfs2_xattr_value_root *xv =
146 (struct ocfs2_xattr_value_root *)et->private; 148 (struct ocfs2_xattr_value_root *)et->et_private;
147 149
148 xv->xr_last_eb_blk = cpu_to_le64(blkno); 150 xv->xr_last_eb_blk = cpu_to_le64(blkno);
149} 151}
@@ -151,7 +153,7 @@ static void ocfs2_xattr_value_set_last_eb_blk(struct ocfs2_extent_tree *et,
151static u64 ocfs2_xattr_value_get_last_eb_blk(struct ocfs2_extent_tree *et) 153static u64 ocfs2_xattr_value_get_last_eb_blk(struct ocfs2_extent_tree *et)
152{ 154{
153 struct ocfs2_xattr_value_root *xv = 155 struct ocfs2_xattr_value_root *xv =
154 (struct ocfs2_xattr_value_root *) et->private; 156 (struct ocfs2_xattr_value_root *) et->et_private;
155 157
156 return le64_to_cpu(xv->xr_last_eb_blk); 158 return le64_to_cpu(xv->xr_last_eb_blk);
157} 159}
@@ -161,7 +163,7 @@ static void ocfs2_xattr_value_update_clusters(struct inode *inode,
161 u32 clusters) 163 u32 clusters)
162{ 164{
163 struct ocfs2_xattr_value_root *xv = 165 struct ocfs2_xattr_value_root *xv =
164 (struct ocfs2_xattr_value_root *)et->private; 166 (struct ocfs2_xattr_value_root *)et->et_private;
165 167
166 le32_add_cpu(&xv->xr_clusters, clusters); 168 le32_add_cpu(&xv->xr_clusters, clusters);
167} 169}
@@ -183,7 +185,7 @@ static void ocfs2_xattr_tree_set_last_eb_blk(struct ocfs2_extent_tree *et,
183 u64 blkno) 185 u64 blkno)
184{ 186{
185 struct ocfs2_xattr_block *xb = 187 struct ocfs2_xattr_block *xb =
186 (struct ocfs2_xattr_block *) et->root_bh->b_data; 188 (struct ocfs2_xattr_block *) et->et_root_bh->b_data;
187 struct ocfs2_xattr_tree_root *xt = &xb->xb_attrs.xb_root; 189 struct ocfs2_xattr_tree_root *xt = &xb->xb_attrs.xb_root;
188 190
189 xt->xt_last_eb_blk = cpu_to_le64(blkno); 191 xt->xt_last_eb_blk = cpu_to_le64(blkno);
@@ -192,7 +194,7 @@ static void ocfs2_xattr_tree_set_last_eb_blk(struct ocfs2_extent_tree *et,
192static u64 ocfs2_xattr_tree_get_last_eb_blk(struct ocfs2_extent_tree *et) 194static u64 ocfs2_xattr_tree_get_last_eb_blk(struct ocfs2_extent_tree *et)
193{ 195{
194 struct ocfs2_xattr_block *xb = 196 struct ocfs2_xattr_block *xb =
195 (struct ocfs2_xattr_block *) et->root_bh->b_data; 197 (struct ocfs2_xattr_block *) et->et_root_bh->b_data;
196 struct ocfs2_xattr_tree_root *xt = &xb->xb_attrs.xb_root; 198 struct ocfs2_xattr_tree_root *xt = &xb->xb_attrs.xb_root;
197 199
198 return le64_to_cpu(xt->xt_last_eb_blk); 200 return le64_to_cpu(xt->xt_last_eb_blk);
@@ -203,7 +205,7 @@ static void ocfs2_xattr_tree_update_clusters(struct inode *inode,
203 u32 clusters) 205 u32 clusters)
204{ 206{
205 struct ocfs2_xattr_block *xb = 207 struct ocfs2_xattr_block *xb =
206 (struct ocfs2_xattr_block *)et->root_bh->b_data; 208 (struct ocfs2_xattr_block *)et->et_root_bh->b_data;
207 209
208 le32_add_cpu(&xb->xb_attrs.xb_root.xt_clusters, clusters); 210 le32_add_cpu(&xb->xb_attrs.xb_root.xt_clusters, clusters);
209} 211}
@@ -233,25 +235,26 @@ static struct ocfs2_extent_tree*
233 if (!et) 235 if (!et)
234 return NULL; 236 return NULL;
235 237
236 et->type = et_type; 238 et->et_type = et_type;
237 get_bh(bh); 239 get_bh(bh);
238 et->root_bh = bh; 240 et->et_root_bh = bh;
239 et->private = private; 241 et->et_private = private;
240 242
241 if (et_type == OCFS2_DINODE_EXTENT) { 243 if (et_type == OCFS2_DINODE_EXTENT) {
242 et->root_el = &((struct ocfs2_dinode *)bh->b_data)->id2.i_list; 244 et->et_root_el =
243 et->eops = &ocfs2_dinode_et_ops; 245 &((struct ocfs2_dinode *)bh->b_data)->id2.i_list;
246 et->et_ops = &ocfs2_dinode_et_ops;
244 } else if (et_type == OCFS2_XATTR_VALUE_EXTENT) { 247 } else if (et_type == OCFS2_XATTR_VALUE_EXTENT) {
245 struct ocfs2_xattr_value_root *xv = 248 struct ocfs2_xattr_value_root *xv =
246 (struct ocfs2_xattr_value_root *) private; 249 (struct ocfs2_xattr_value_root *) private;
247 et->root_el = &xv->xr_list; 250 et->et_root_el = &xv->xr_list;
248 et->eops = &ocfs2_xattr_et_ops; 251 et->et_ops = &ocfs2_xattr_et_ops;
249 } else if (et_type == OCFS2_XATTR_TREE_EXTENT) { 252 } else if (et_type == OCFS2_XATTR_TREE_EXTENT) {
250 struct ocfs2_xattr_block *xb = 253 struct ocfs2_xattr_block *xb =
251 (struct ocfs2_xattr_block *)bh->b_data; 254 (struct ocfs2_xattr_block *)bh->b_data;
252 et->root_el = &xb->xb_attrs.xb_root.xt_list; 255 et->et_root_el = &xb->xb_attrs.xb_root.xt_list;
253 et->eops = &ocfs2_xattr_tree_et_ops; 256 et->et_ops = &ocfs2_xattr_tree_et_ops;
254 et->max_leaf_clusters = ocfs2_clusters_for_bytes(inode->i_sb, 257 et->et_max_leaf_clusters = ocfs2_clusters_for_bytes(inode->i_sb,
255 OCFS2_MAX_XATTR_TREE_LEAF_SIZE); 258 OCFS2_MAX_XATTR_TREE_LEAF_SIZE);
256 } 259 }
257 260
@@ -261,7 +264,7 @@ static struct ocfs2_extent_tree*
261static void ocfs2_free_extent_tree(struct ocfs2_extent_tree *et) 264static void ocfs2_free_extent_tree(struct ocfs2_extent_tree *et)
262{ 265{
263 if (et) { 266 if (et) {
264 brelse(et->root_bh); 267 brelse(et->et_root_bh);
265 kfree(et); 268 kfree(et);
266 } 269 }
267} 270}
@@ -269,25 +272,25 @@ static void ocfs2_free_extent_tree(struct ocfs2_extent_tree *et)
269static inline void ocfs2_et_set_last_eb_blk(struct ocfs2_extent_tree *et, 272static inline void ocfs2_et_set_last_eb_blk(struct ocfs2_extent_tree *et,
270 u64 new_last_eb_blk) 273 u64 new_last_eb_blk)
271{ 274{
272 et->eops->eo_set_last_eb_blk(et, new_last_eb_blk); 275 et->et_ops->eo_set_last_eb_blk(et, new_last_eb_blk);
273} 276}
274 277
275static inline u64 ocfs2_et_get_last_eb_blk(struct ocfs2_extent_tree *et) 278static inline u64 ocfs2_et_get_last_eb_blk(struct ocfs2_extent_tree *et)
276{ 279{
277 return et->eops->eo_get_last_eb_blk(et); 280 return et->et_ops->eo_get_last_eb_blk(et);
278} 281}
279 282
280static inline void ocfs2_et_update_clusters(struct inode *inode, 283static inline void ocfs2_et_update_clusters(struct inode *inode,
281 struct ocfs2_extent_tree *et, 284 struct ocfs2_extent_tree *et,
282 u32 clusters) 285 u32 clusters)
283{ 286{
284 et->eops->eo_update_clusters(inode, et, clusters); 287 et->et_ops->eo_update_clusters(inode, et, clusters);
285} 288}
286 289
287static inline int ocfs2_et_sanity_check(struct inode *inode, 290static inline int ocfs2_et_sanity_check(struct inode *inode,
288 struct ocfs2_extent_tree *et) 291 struct ocfs2_extent_tree *et)
289{ 292{
290 return et->eops->eo_sanity_check(inode, et); 293 return et->et_ops->eo_sanity_check(inode, et);
291} 294}
292 295
293static void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc); 296static void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc);
@@ -805,7 +808,7 @@ static int ocfs2_add_branch(struct ocfs2_super *osb,
805 eb = (struct ocfs2_extent_block *) eb_bh->b_data; 808 eb = (struct ocfs2_extent_block *) eb_bh->b_data;
806 el = &eb->h_list; 809 el = &eb->h_list;
807 } else 810 } else
808 el = et->root_el; 811 el = et->et_root_el;
809 812
810 /* we never add a branch to a leaf. */ 813 /* we never add a branch to a leaf. */
811 BUG_ON(!el->l_tree_depth); 814 BUG_ON(!el->l_tree_depth);
@@ -895,7 +898,7 @@ static int ocfs2_add_branch(struct ocfs2_super *osb,
895 mlog_errno(status); 898 mlog_errno(status);
896 goto bail; 899 goto bail;
897 } 900 }
898 status = ocfs2_journal_access(handle, inode, et->root_bh, 901 status = ocfs2_journal_access(handle, inode, et->et_root_bh,
899 OCFS2_JOURNAL_ACCESS_WRITE); 902 OCFS2_JOURNAL_ACCESS_WRITE);
900 if (status < 0) { 903 if (status < 0) {
901 mlog_errno(status); 904 mlog_errno(status);
@@ -928,7 +931,7 @@ static int ocfs2_add_branch(struct ocfs2_super *osb,
928 status = ocfs2_journal_dirty(handle, *last_eb_bh); 931 status = ocfs2_journal_dirty(handle, *last_eb_bh);
929 if (status < 0) 932 if (status < 0)
930 mlog_errno(status); 933 mlog_errno(status);
931 status = ocfs2_journal_dirty(handle, et->root_bh); 934 status = ocfs2_journal_dirty(handle, et->et_root_bh);
932 if (status < 0) 935 if (status < 0)
933 mlog_errno(status); 936 mlog_errno(status);
934 if (eb_bh) { 937 if (eb_bh) {
@@ -994,7 +997,7 @@ static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
994 } 997 }
995 998
996 eb_el = &eb->h_list; 999 eb_el = &eb->h_list;
997 root_el = et->root_el; 1000 root_el = et->et_root_el;
998 1001
999 status = ocfs2_journal_access(handle, inode, new_eb_bh, 1002 status = ocfs2_journal_access(handle, inode, new_eb_bh,
1000 OCFS2_JOURNAL_ACCESS_CREATE); 1003 OCFS2_JOURNAL_ACCESS_CREATE);
@@ -1015,7 +1018,7 @@ static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
1015 goto bail; 1018 goto bail;
1016 } 1019 }
1017 1020
1018 status = ocfs2_journal_access(handle, inode, et->root_bh, 1021 status = ocfs2_journal_access(handle, inode, et->et_root_bh,
1019 OCFS2_JOURNAL_ACCESS_WRITE); 1022 OCFS2_JOURNAL_ACCESS_WRITE);
1020 if (status < 0) { 1023 if (status < 0) {
1021 mlog_errno(status); 1024 mlog_errno(status);
@@ -1038,7 +1041,7 @@ static int ocfs2_shift_tree_depth(struct ocfs2_super *osb,
1038 if (root_el->l_tree_depth == cpu_to_le16(1)) 1041 if (root_el->l_tree_depth == cpu_to_le16(1))
1039 ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno)); 1042 ocfs2_et_set_last_eb_blk(et, le64_to_cpu(eb->h_blkno));
1040 1043
1041 status = ocfs2_journal_dirty(handle, et->root_bh); 1044 status = ocfs2_journal_dirty(handle, et->et_root_bh);
1042 if (status < 0) { 1045 if (status < 0) {
1043 mlog_errno(status); 1046 mlog_errno(status);
1044 goto bail; 1047 goto bail;
@@ -1088,7 +1091,7 @@ static int ocfs2_find_branch_target(struct ocfs2_super *osb,
1088 1091
1089 *target_bh = NULL; 1092 *target_bh = NULL;
1090 1093
1091 el = et->root_el; 1094 el = et->et_root_el;
1092 1095
1093 while(le16_to_cpu(el->l_tree_depth) > 1) { 1096 while(le16_to_cpu(el->l_tree_depth) > 1) {
1094 if (le16_to_cpu(el->l_next_free_rec) == 0) { 1097 if (le16_to_cpu(el->l_next_free_rec) == 0) {
@@ -1140,7 +1143,7 @@ static int ocfs2_find_branch_target(struct ocfs2_super *osb,
1140 1143
1141 /* If we didn't find one and the fe doesn't have any room, 1144 /* If we didn't find one and the fe doesn't have any room,
1142 * then return '1' */ 1145 * then return '1' */
1143 el = et->root_el; 1146 el = et->et_root_el;
1144 if (!lowest_bh && (el->l_next_free_rec == el->l_count)) 1147 if (!lowest_bh && (el->l_next_free_rec == el->l_count))
1145 status = 1; 1148 status = 1;
1146 1149
@@ -1169,7 +1172,7 @@ static int ocfs2_grow_tree(struct inode *inode, handle_t *handle,
1169 struct ocfs2_alloc_context *meta_ac) 1172 struct ocfs2_alloc_context *meta_ac)
1170{ 1173{
1171 int ret, shift; 1174 int ret, shift;
1172 struct ocfs2_extent_list *el = et->root_el; 1175 struct ocfs2_extent_list *el = et->et_root_el;
1173 int depth = le16_to_cpu(el->l_tree_depth); 1176 int depth = le16_to_cpu(el->l_tree_depth);
1174 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 1177 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
1175 struct buffer_head *bh = NULL; 1178 struct buffer_head *bh = NULL;
@@ -2765,7 +2768,7 @@ static int ocfs2_remove_rightmost_path(struct inode *inode, handle_t *handle,
2765 */ 2768 */
2766 ocfs2_unlink_path(inode, handle, dealloc, path, 1); 2769 ocfs2_unlink_path(inode, handle, dealloc, path, 1);
2767 2770
2768 el = et->root_el; 2771 el = et->et_root_el;
2769 el->l_tree_depth = 0; 2772 el->l_tree_depth = 0;
2770 el->l_next_free_rec = 0; 2773 el->l_next_free_rec = 0;
2771 memset(&el->l_recs[0], 0, sizeof(struct ocfs2_extent_rec)); 2774 memset(&el->l_recs[0], 0, sizeof(struct ocfs2_extent_rec));
@@ -3898,9 +3901,9 @@ static int ocfs2_do_insert_extent(struct inode *inode,
3898 struct ocfs2_path *left_path = NULL; 3901 struct ocfs2_path *left_path = NULL;
3899 struct ocfs2_extent_list *el; 3902 struct ocfs2_extent_list *el;
3900 3903
3901 el = et->root_el; 3904 el = et->et_root_el;
3902 3905
3903 ret = ocfs2_journal_access(handle, inode, et->root_bh, 3906 ret = ocfs2_journal_access(handle, inode, et->et_root_bh,
3904 OCFS2_JOURNAL_ACCESS_WRITE); 3907 OCFS2_JOURNAL_ACCESS_WRITE);
3905 if (ret) { 3908 if (ret) {
3906 mlog_errno(ret); 3909 mlog_errno(ret);
@@ -3912,7 +3915,7 @@ static int ocfs2_do_insert_extent(struct inode *inode,
3912 goto out_update_clusters; 3915 goto out_update_clusters;
3913 } 3916 }
3914 3917
3915 right_path = ocfs2_new_path(et->root_bh, et->root_el); 3918 right_path = ocfs2_new_path(et->et_root_bh, et->et_root_el);
3916 if (!right_path) { 3919 if (!right_path) {
3917 ret = -ENOMEM; 3920 ret = -ENOMEM;
3918 mlog_errno(ret); 3921 mlog_errno(ret);
@@ -3962,7 +3965,7 @@ static int ocfs2_do_insert_extent(struct inode *inode,
3962 * ocfs2_rotate_tree_right() might have extended the 3965 * ocfs2_rotate_tree_right() might have extended the
3963 * transaction without re-journaling our tree root. 3966 * transaction without re-journaling our tree root.
3964 */ 3967 */
3965 ret = ocfs2_journal_access(handle, inode, et->root_bh, 3968 ret = ocfs2_journal_access(handle, inode, et->et_root_bh,
3966 OCFS2_JOURNAL_ACCESS_WRITE); 3969 OCFS2_JOURNAL_ACCESS_WRITE);
3967 if (ret) { 3970 if (ret) {
3968 mlog_errno(ret); 3971 mlog_errno(ret);
@@ -3990,7 +3993,7 @@ out_update_clusters:
3990 ocfs2_et_update_clusters(inode, et, 3993 ocfs2_et_update_clusters(inode, et,
3991 le16_to_cpu(insert_rec->e_leaf_clusters)); 3994 le16_to_cpu(insert_rec->e_leaf_clusters));
3992 3995
3993 ret = ocfs2_journal_dirty(handle, et->root_bh); 3996 ret = ocfs2_journal_dirty(handle, et->et_root_bh);
3994 if (ret) 3997 if (ret)
3995 mlog_errno(ret); 3998 mlog_errno(ret);
3996 3999
@@ -4148,7 +4151,8 @@ static void ocfs2_figure_contig_type(struct inode *inode,
4148 * Caller might want us to limit the size of extents, don't 4151 * Caller might want us to limit the size of extents, don't
4149 * calculate contiguousness if we might exceed that limit. 4152 * calculate contiguousness if we might exceed that limit.
4150 */ 4153 */
4151 if (et->max_leaf_clusters && len > et->max_leaf_clusters) 4154 if (et->et_max_leaf_clusters &&
4155 (len > et->et_max_leaf_clusters))
4152 insert->ins_contig = CONTIG_NONE; 4156 insert->ins_contig = CONTIG_NONE;
4153 } 4157 }
4154} 4158}
@@ -4225,7 +4229,7 @@ static int ocfs2_figure_insert_type(struct inode *inode,
4225 4229
4226 insert->ins_split = SPLIT_NONE; 4230 insert->ins_split = SPLIT_NONE;
4227 4231
4228 el = et->root_el; 4232 el = et->et_root_el;
4229 insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth); 4233 insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth);
4230 4234
4231 if (el->l_tree_depth) { 4235 if (el->l_tree_depth) {
@@ -4263,7 +4267,7 @@ static int ocfs2_figure_insert_type(struct inode *inode,
4263 return 0; 4267 return 0;
4264 } 4268 }
4265 4269
4266 path = ocfs2_new_path(et->root_bh, et->root_el); 4270 path = ocfs2_new_path(et->et_root_bh, et->et_root_el);
4267 if (!path) { 4271 if (!path) {
4268 ret = -ENOMEM; 4272 ret = -ENOMEM;
4269 mlog_errno(ret); 4273 mlog_errno(ret);
@@ -4404,7 +4408,7 @@ static int ocfs2_insert_extent(struct ocfs2_super *osb,
4404 status = ocfs2_do_insert_extent(inode, handle, et, &rec, &insert); 4408 status = ocfs2_do_insert_extent(inode, handle, et, &rec, &insert);
4405 if (status < 0) 4409 if (status < 0)
4406 mlog_errno(status); 4410 mlog_errno(status);
4407 else if (et->type == OCFS2_DINODE_EXTENT) 4411 else if (et->et_type == OCFS2_DINODE_EXTENT)
4408 ocfs2_extent_map_insert_rec(inode, &rec); 4412 ocfs2_extent_map_insert_rec(inode, &rec);
4409 4413
4410bail: 4414bail:
@@ -4678,7 +4682,7 @@ leftright:
4678 */ 4682 */
4679 rec = path_leaf_el(path)->l_recs[split_index]; 4683 rec = path_leaf_el(path)->l_recs[split_index];
4680 4684
4681 rightmost_el = et->root_el; 4685 rightmost_el = et->et_root_el;
4682 4686
4683 depth = le16_to_cpu(rightmost_el->l_tree_depth); 4687 depth = le16_to_cpu(rightmost_el->l_tree_depth);
4684 if (depth) { 4688 if (depth) {
@@ -4921,7 +4925,7 @@ int ocfs2_mark_extent_written(struct inode *inode, struct buffer_head *root_bh,
4921 if (et_type == OCFS2_DINODE_EXTENT) 4925 if (et_type == OCFS2_DINODE_EXTENT)
4922 ocfs2_extent_map_trunc(inode, 0); 4926 ocfs2_extent_map_trunc(inode, 0);
4923 4927
4924 left_path = ocfs2_new_path(et->root_bh, et->root_el); 4928 left_path = ocfs2_new_path(et->et_root_bh, et->et_root_el);
4925 if (!left_path) { 4929 if (!left_path) {
4926 ret = -ENOMEM; 4930 ret = -ENOMEM;
4927 mlog_errno(ret); 4931 mlog_errno(ret);
@@ -5001,7 +5005,7 @@ static int ocfs2_split_tree(struct inode *inode, struct ocfs2_extent_tree *et,
5001 rightmost_el = path_leaf_el(path); 5005 rightmost_el = path_leaf_el(path);
5002 5006
5003 credits += path->p_tree_depth + 5007 credits += path->p_tree_depth +
5004 ocfs2_extend_meta_needed(et->root_el); 5008 ocfs2_extend_meta_needed(et->et_root_el);
5005 ret = ocfs2_extend_trans(handle, credits); 5009 ret = ocfs2_extend_trans(handle, credits);
5006 if (ret) { 5010 if (ret) {
5007 mlog_errno(ret); 5011 mlog_errno(ret);
@@ -5214,7 +5218,7 @@ int ocfs2_remove_extent(struct inode *inode, struct buffer_head *root_bh,
5214 5218
5215 ocfs2_extent_map_trunc(inode, 0); 5219 ocfs2_extent_map_trunc(inode, 0);
5216 5220
5217 path = ocfs2_new_path(et->root_bh, et->root_el); 5221 path = ocfs2_new_path(et->et_root_bh, et->et_root_el);
5218 if (!path) { 5222 if (!path) {
5219 ret = -ENOMEM; 5223 ret = -ENOMEM;
5220 mlog_errno(ret); 5224 mlog_errno(ret);