Lines Matching refs:path
116 struct ext4_ext_path *path) in ext4_ext_get_access() argument
118 if (path->p_bh) { in ext4_ext_get_access()
120 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access()
134 struct ext4_ext_path *path) in ext4_ext_dirty() argument
137 if (path->p_bh) { in ext4_ext_dirty()
139 err = ext4_handle_dirty_metadata(handle, inode, path->p_bh); in ext4_ext_dirty()
148 struct ext4_ext_path *path, in ext4_ext_find_goal() argument
157 if (path) { in ext4_ext_find_goal()
159 depth = path->p_depth; in ext4_ext_find_goal()
162 ex = path[depth].p_ext; in ext4_ext_find_goal()
168 if (path[depth].p_bh) in ext4_ext_find_goal()
169 return path[depth].p_bh->b_blocknr; in ext4_ext_find_goal()
190 struct ext4_ext_path *path, in ext4_ext_new_meta_block() argument
195 goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block)); in ext4_ext_new_meta_block()
349 static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path) in ext4_ext_show_path() argument
351 int k, l = path->p_depth; in ext4_ext_show_path()
354 for (k = 0; k <= l; k++, path++) { in ext4_ext_show_path()
355 if (path->p_idx) { in ext4_ext_show_path()
356 ext_debug(" %d->%llu", le32_to_cpu(path->p_idx->ei_block), in ext4_ext_show_path()
357 idx_pblock(path->p_idx)); in ext4_ext_show_path()
358 } else if (path->p_ext) { in ext4_ext_show_path()
360 le32_to_cpu(path->p_ext->ee_block), in ext4_ext_show_path()
361 ext4_ext_get_actual_len(path->p_ext), in ext4_ext_show_path()
362 ext_pblock(path->p_ext)); in ext4_ext_show_path()
369 static void ext4_ext_show_leaf(struct inode *inode, struct ext4_ext_path *path) in ext4_ext_show_leaf() argument
376 if (!path) in ext4_ext_show_leaf()
379 eh = path[depth].p_hdr; in ext4_ext_show_leaf()
389 #define ext4_ext_show_path(inode, path) argument
390 #define ext4_ext_show_leaf(inode, path) argument
393 void ext4_ext_drop_refs(struct ext4_ext_path *path) in ext4_ext_drop_refs() argument
395 int depth = path->p_depth; in ext4_ext_drop_refs()
398 for (i = 0; i <= depth; i++, path++) in ext4_ext_drop_refs()
399 if (path->p_bh) { in ext4_ext_drop_refs()
400 brelse(path->p_bh); in ext4_ext_drop_refs()
401 path->p_bh = NULL; in ext4_ext_drop_refs()
412 struct ext4_ext_path *path, ext4_lblk_t block) in ext4_ext_binsearch_idx() argument
414 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch_idx()
433 path->p_idx = l - 1; in ext4_ext_binsearch_idx()
434 ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block), in ext4_ext_binsearch_idx()
435 idx_pblock(path->p_idx)); in ext4_ext_binsearch_idx()
459 BUG_ON(chix != path->p_idx); in ext4_ext_binsearch_idx()
472 struct ext4_ext_path *path, ext4_lblk_t block) in ext4_ext_binsearch() argument
474 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch()
501 path->p_ext = l - 1; in ext4_ext_binsearch()
503 le32_to_cpu(path->p_ext->ee_block), in ext4_ext_binsearch()
504 ext_pblock(path->p_ext), in ext4_ext_binsearch()
505 ext4_ext_get_actual_len(path->p_ext)); in ext4_ext_binsearch()
520 BUG_ON(chex != path->p_ext); in ext4_ext_binsearch()
542 struct ext4_ext_path *path) in ext4_ext_find_extent() argument
555 if (!path) { in ext4_ext_find_extent()
556 path = kzalloc(sizeof(struct ext4_ext_path) * (depth + 2), in ext4_ext_find_extent()
558 if (!path) in ext4_ext_find_extent()
562 path[0].p_hdr = eh; in ext4_ext_find_extent()
563 path[0].p_bh = NULL; in ext4_ext_find_extent()
571 ext4_ext_binsearch_idx(inode, path + ppos, block); in ext4_ext_find_extent()
572 path[ppos].p_block = idx_pblock(path[ppos].p_idx); in ext4_ext_find_extent()
573 path[ppos].p_depth = i; in ext4_ext_find_extent()
574 path[ppos].p_ext = NULL; in ext4_ext_find_extent()
576 bh = sb_bread(inode->i_sb, path[ppos].p_block); in ext4_ext_find_extent()
583 path[ppos].p_bh = bh; in ext4_ext_find_extent()
584 path[ppos].p_hdr = eh; in ext4_ext_find_extent()
591 path[ppos].p_depth = i; in ext4_ext_find_extent()
592 path[ppos].p_ext = NULL; in ext4_ext_find_extent()
593 path[ppos].p_idx = NULL; in ext4_ext_find_extent()
596 ext4_ext_binsearch(inode, path + ppos, block); in ext4_ext_find_extent()
598 if (path[ppos].p_ext) in ext4_ext_find_extent()
599 path[ppos].p_block = ext_pblock(path[ppos].p_ext); in ext4_ext_find_extent()
601 ext4_ext_show_path(inode, path); in ext4_ext_find_extent()
603 return path; in ext4_ext_find_extent()
606 ext4_ext_drop_refs(path); in ext4_ext_find_extent()
608 kfree(path); in ext4_ext_find_extent()
679 struct ext4_ext_path *path, in ext4_ext_split() argument
698 BUG_ON(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr)); in ext4_ext_split()
699 if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { in ext4_ext_split()
700 border = path[depth].p_ext[1].ee_block; in ext4_ext_split()
730 newblock = ext4_ext_new_meta_block(handle, inode, path, in ext4_ext_split()
759 BUG_ON(path[depth].p_hdr->eh_entries != path[depth].p_hdr->eh_max); in ext4_ext_split()
763 path[depth].p_ext++; in ext4_ext_split()
764 while (path[depth].p_ext <= in ext4_ext_split()
765 EXT_MAX_EXTENT(path[depth].p_hdr)) { in ext4_ext_split()
767 le32_to_cpu(path[depth].p_ext->ee_block), in ext4_ext_split()
768 ext_pblock(path[depth].p_ext), in ext4_ext_split()
769 ext4_ext_get_actual_len(path[depth].p_ext), in ext4_ext_split()
774 path[depth].p_ext++; in ext4_ext_split()
778 memmove(ex, path[depth].p_ext-m, sizeof(struct ext4_extent)*m); in ext4_ext_split()
793 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_split()
796 le16_add_cpu(&path[depth].p_hdr->eh_entries, -m); in ext4_ext_split()
797 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_split()
838 path[i].p_idx++; in ext4_ext_split()
840 ext_debug("cur 0x%p, last 0x%p\n", path[i].p_idx, in ext4_ext_split()
841 EXT_MAX_INDEX(path[i].p_hdr)); in ext4_ext_split()
842 BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) != in ext4_ext_split()
843 EXT_LAST_INDEX(path[i].p_hdr)); in ext4_ext_split()
844 while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { in ext4_ext_split()
846 le32_to_cpu(path[i].p_idx->ei_block), in ext4_ext_split()
847 idx_pblock(path[i].p_idx), in ext4_ext_split()
853 path[i].p_idx++; in ext4_ext_split()
857 memmove(++fidx, path[i].p_idx - m, in ext4_ext_split()
872 err = ext4_ext_get_access(handle, inode, path + i); in ext4_ext_split()
875 le16_add_cpu(&path[i].p_hdr->eh_entries, -m); in ext4_ext_split()
876 err = ext4_ext_dirty(handle, inode, path + i); in ext4_ext_split()
885 err = ext4_ext_insert_index(handle, inode, path + at, in ext4_ext_split()
917 struct ext4_ext_path *path, in ext4_ext_grow_indepth() argument
920 struct ext4_ext_path *curp = path; in ext4_ext_grow_indepth()
927 newblock = ext4_ext_new_meta_block(handle, inode, path, newext, &err); in ext4_ext_grow_indepth()
974 if (path[0].p_hdr->eh_depth) in ext4_ext_grow_indepth()
976 EXT_FIRST_INDEX(path[0].p_hdr)->ei_block; in ext4_ext_grow_indepth()
979 EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block; in ext4_ext_grow_indepth()
988 neh->eh_depth = cpu_to_le16(path->p_depth + 1); in ext4_ext_grow_indepth()
1002 struct ext4_ext_path *path, in ext4_ext_create_new_leaf() argument
1012 curp = path + depth; in ext4_ext_create_new_leaf()
1023 err = ext4_ext_split(handle, inode, path, newext, i); in ext4_ext_create_new_leaf()
1028 ext4_ext_drop_refs(path); in ext4_ext_create_new_leaf()
1029 path = ext4_ext_find_extent(inode, in ext4_ext_create_new_leaf()
1031 path); in ext4_ext_create_new_leaf()
1032 if (IS_ERR(path)) in ext4_ext_create_new_leaf()
1033 err = PTR_ERR(path); in ext4_ext_create_new_leaf()
1036 err = ext4_ext_grow_indepth(handle, inode, path, newext); in ext4_ext_create_new_leaf()
1041 ext4_ext_drop_refs(path); in ext4_ext_create_new_leaf()
1042 path = ext4_ext_find_extent(inode, in ext4_ext_create_new_leaf()
1044 path); in ext4_ext_create_new_leaf()
1045 if (IS_ERR(path)) { in ext4_ext_create_new_leaf()
1046 err = PTR_ERR(path); in ext4_ext_create_new_leaf()
1055 if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { in ext4_ext_create_new_leaf()
1073 ext4_ext_search_left(struct inode *inode, struct ext4_ext_path *path, in ext4_ext_search_left() argument
1080 BUG_ON(path == NULL); in ext4_ext_search_left()
1081 depth = path->p_depth; in ext4_ext_search_left()
1084 if (depth == 0 && path->p_ext == NULL) in ext4_ext_search_left()
1091 ex = path[depth].p_ext; in ext4_ext_search_left()
1094 BUG_ON(EXT_FIRST_EXTENT(path[depth].p_hdr) != ex); in ext4_ext_search_left()
1096 ix = path[depth].p_idx; in ext4_ext_search_left()
1097 BUG_ON(ix != EXT_FIRST_INDEX(path[depth].p_hdr)); in ext4_ext_search_left()
1117 ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, in ext4_ext_search_right() argument
1128 BUG_ON(path == NULL); in ext4_ext_search_right()
1129 depth = path->p_depth; in ext4_ext_search_right()
1132 if (depth == 0 && path->p_ext == NULL) in ext4_ext_search_right()
1139 ex = path[depth].p_ext; in ext4_ext_search_right()
1142 BUG_ON(EXT_FIRST_EXTENT(path[depth].p_hdr) != ex); in ext4_ext_search_right()
1144 ix = path[depth].p_idx; in ext4_ext_search_right()
1145 BUG_ON(ix != EXT_FIRST_INDEX(path[depth].p_hdr)); in ext4_ext_search_right()
1154 if (ex != EXT_LAST_EXTENT(path[depth].p_hdr)) { in ext4_ext_search_right()
1164 ix = path[depth].p_idx; in ext4_ext_search_right()
1165 if (ix != EXT_LAST_INDEX(path[depth].p_hdr)) in ext4_ext_search_right()
1178 while (++depth < path->p_depth) { in ext4_ext_search_right()
1184 if (ext4_ext_check_header(inode, eh, path->p_depth - depth)) { in ext4_ext_search_right()
1197 if (ext4_ext_check_header(inode, eh, path->p_depth - depth)) { in ext4_ext_search_right()
1216 ext4_ext_next_allocated_block(struct ext4_ext_path *path) in ext4_ext_next_allocated_block() argument
1220 BUG_ON(path == NULL); in ext4_ext_next_allocated_block()
1221 depth = path->p_depth; in ext4_ext_next_allocated_block()
1223 if (depth == 0 && path->p_ext == NULL) in ext4_ext_next_allocated_block()
1227 if (depth == path->p_depth) { in ext4_ext_next_allocated_block()
1229 if (path[depth].p_ext != in ext4_ext_next_allocated_block()
1230 EXT_LAST_EXTENT(path[depth].p_hdr)) in ext4_ext_next_allocated_block()
1231 return le32_to_cpu(path[depth].p_ext[1].ee_block); in ext4_ext_next_allocated_block()
1234 if (path[depth].p_idx != in ext4_ext_next_allocated_block()
1235 EXT_LAST_INDEX(path[depth].p_hdr)) in ext4_ext_next_allocated_block()
1236 return le32_to_cpu(path[depth].p_idx[1].ei_block); in ext4_ext_next_allocated_block()
1249 struct ext4_ext_path *path) in ext4_ext_next_leaf_block() argument
1253 BUG_ON(path == NULL); in ext4_ext_next_leaf_block()
1254 depth = path->p_depth; in ext4_ext_next_leaf_block()
1264 if (path[depth].p_idx != in ext4_ext_next_leaf_block()
1265 EXT_LAST_INDEX(path[depth].p_hdr)) in ext4_ext_next_leaf_block()
1267 le32_to_cpu(path[depth].p_idx[1].ei_block); in ext4_ext_next_leaf_block()
1281 struct ext4_ext_path *path) in ext4_ext_correct_indexes() argument
1289 eh = path[depth].p_hdr; in ext4_ext_correct_indexes()
1290 ex = path[depth].p_ext; in ext4_ext_correct_indexes()
1308 border = path[depth].p_ext->ee_block; in ext4_ext_correct_indexes()
1309 err = ext4_ext_get_access(handle, inode, path + k); in ext4_ext_correct_indexes()
1312 path[k].p_idx->ei_block = border; in ext4_ext_correct_indexes()
1313 err = ext4_ext_dirty(handle, inode, path + k); in ext4_ext_correct_indexes()
1319 if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) in ext4_ext_correct_indexes()
1321 err = ext4_ext_get_access(handle, inode, path + k); in ext4_ext_correct_indexes()
1324 path[k].p_idx->ei_block = border; in ext4_ext_correct_indexes()
1325 err = ext4_ext_dirty(handle, inode, path + k); in ext4_ext_correct_indexes()
1383 struct ext4_ext_path *path, in ext4_ext_try_to_merge() argument
1392 BUG_ON(path[depth].p_hdr == NULL); in ext4_ext_try_to_merge()
1393 eh = path[depth].p_hdr; in ext4_ext_try_to_merge()
1432 struct ext4_ext_path *path) in ext4_ext_check_overlap() argument
1441 if (!path[depth].p_ext) in ext4_ext_check_overlap()
1443 b2 = le32_to_cpu(path[depth].p_ext->ee_block); in ext4_ext_check_overlap()
1450 b2 = ext4_ext_next_allocated_block(path); in ext4_ext_check_overlap()
1478 struct ext4_ext_path *path, in ext4_ext_insert_extent() argument
1491 ex = path[depth].p_ext; in ext4_ext_insert_extent()
1492 BUG_ON(path[depth].p_hdr == NULL); in ext4_ext_insert_extent()
1500 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_insert_extent()
1515 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
1522 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
1528 next = ext4_ext_next_leaf_block(inode, path); in ext4_ext_insert_extent()
1536 BUG_ON(npath->p_depth != path->p_depth); in ext4_ext_insert_extent()
1541 path = npath; in ext4_ext_insert_extent()
1552 err = ext4_ext_create_new_leaf(handle, inode, path, newext); in ext4_ext_insert_extent()
1556 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
1559 nearex = path[depth].p_ext; in ext4_ext_insert_extent()
1561 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_insert_extent()
1571 path[depth].p_ext = EXT_FIRST_EXTENT(eh); in ext4_ext_insert_extent()
1587 path[depth].p_ext = nearex + 1; in ext4_ext_insert_extent()
1599 path[depth].p_ext = nearex; in ext4_ext_insert_extent()
1603 nearex = path[depth].p_ext; in ext4_ext_insert_extent()
1610 ext4_ext_try_to_merge(inode, path, nearex); in ext4_ext_insert_extent()
1615 err = ext4_ext_correct_indexes(handle, inode, path); in ext4_ext_insert_extent()
1619 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_insert_extent()
1634 struct ext4_ext_path *path = NULL; in ext4_ext_walk_space() local
1647 path = ext4_ext_find_extent(inode, block, path); in ext4_ext_walk_space()
1648 if (IS_ERR(path)) { in ext4_ext_walk_space()
1649 err = PTR_ERR(path); in ext4_ext_walk_space()
1650 path = NULL; in ext4_ext_walk_space()
1655 BUG_ON(path[depth].p_hdr == NULL); in ext4_ext_walk_space()
1656 ex = path[depth].p_ext; in ext4_ext_walk_space()
1657 next = ext4_ext_next_allocated_block(path); in ext4_ext_walk_space()
1707 err = func(inode, path, &cbex, ex, cbdata); in ext4_ext_walk_space()
1708 ext4_ext_drop_refs(path); in ext4_ext_walk_space()
1722 kfree(path); in ext4_ext_walk_space()
1723 path = NULL; in ext4_ext_walk_space()
1729 if (path) { in ext4_ext_walk_space()
1730 ext4_ext_drop_refs(path); in ext4_ext_walk_space()
1731 kfree(path); in ext4_ext_walk_space()
1756 ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path, in ext4_ext_put_gap_in_cache() argument
1764 ex = path[depth].p_ext; in ext4_ext_put_gap_in_cache()
1783 next = ext4_ext_next_allocated_block(path); in ext4_ext_put_gap_in_cache()
1834 struct ext4_ext_path *path) in ext4_ext_rm_idx() argument
1841 path--; in ext4_ext_rm_idx()
1842 leaf = idx_pblock(path->p_idx); in ext4_ext_rm_idx()
1843 BUG_ON(path->p_hdr->eh_entries == 0); in ext4_ext_rm_idx()
1844 err = ext4_ext_get_access(handle, inode, path); in ext4_ext_rm_idx()
1847 le16_add_cpu(&path->p_hdr->eh_entries, -1); in ext4_ext_rm_idx()
1848 err = ext4_ext_dirty(handle, inode, path); in ext4_ext_rm_idx()
1866 struct ext4_ext_path *path) in ext4_ext_calc_credits_for_single_extent() argument
1868 if (path) { in ext4_ext_calc_credits_for_single_extent()
1873 if (le16_to_cpu(path[depth].p_hdr->eh_entries) in ext4_ext_calc_credits_for_single_extent()
1874 < le16_to_cpu(path[depth].p_hdr->eh_max)) { in ext4_ext_calc_credits_for_single_extent()
1969 struct ext4_ext_path *path, ext4_lblk_t start) in ext4_ext_rm_leaf() argument
1983 if (!path[depth].p_hdr) in ext4_ext_rm_leaf()
1984 path[depth].p_hdr = ext_block_hdr(path[depth].p_bh); in ext4_ext_rm_leaf()
1985 eh = path[depth].p_hdr; in ext4_ext_rm_leaf()
1999 path[depth].p_ext = ex; in ext4_ext_rm_leaf()
2046 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_rm_leaf()
2069 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_rm_leaf()
2081 err = ext4_ext_correct_indexes(handle, inode, path); in ext4_ext_rm_leaf()
2085 if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) in ext4_ext_rm_leaf()
2086 err = ext4_ext_rm_idx(handle, inode, path + depth); in ext4_ext_rm_leaf()
2097 ext4_ext_more_to_rm(struct ext4_ext_path *path) in ext4_ext_more_to_rm() argument
2099 BUG_ON(path->p_idx == NULL); in ext4_ext_more_to_rm()
2101 if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) in ext4_ext_more_to_rm()
2108 if (le16_to_cpu(path->p_hdr->eh_entries) == path->p_block) in ext4_ext_more_to_rm()
2117 struct ext4_ext_path *path; in ext4_ext_remove_space() local
2134 path = kzalloc(sizeof(struct ext4_ext_path) * (depth + 1), GFP_NOFS); in ext4_ext_remove_space()
2135 if (path == NULL) { in ext4_ext_remove_space()
2139 path[0].p_hdr = ext_inode_hdr(inode); in ext4_ext_remove_space()
2140 if (ext4_ext_check_header(inode, path[0].p_hdr, depth)) { in ext4_ext_remove_space()
2144 path[0].p_depth = depth; in ext4_ext_remove_space()
2149 err = ext4_ext_rm_leaf(handle, inode, path, start); in ext4_ext_remove_space()
2151 brelse(path[i].p_bh); in ext4_ext_remove_space()
2152 path[i].p_bh = NULL; in ext4_ext_remove_space()
2158 if (!path[i].p_hdr) { in ext4_ext_remove_space()
2160 path[i].p_hdr = ext_block_hdr(path[i].p_bh); in ext4_ext_remove_space()
2163 if (!path[i].p_idx) { in ext4_ext_remove_space()
2165 path[i].p_idx = EXT_LAST_INDEX(path[i].p_hdr); in ext4_ext_remove_space()
2166 path[i].p_block = le16_to_cpu(path[i].p_hdr->eh_entries)+1; in ext4_ext_remove_space()
2168 path[i].p_hdr, in ext4_ext_remove_space()
2169 le16_to_cpu(path[i].p_hdr->eh_entries)); in ext4_ext_remove_space()
2172 path[i].p_idx--; in ext4_ext_remove_space()
2176 i, EXT_FIRST_INDEX(path[i].p_hdr), in ext4_ext_remove_space()
2177 path[i].p_idx); in ext4_ext_remove_space()
2178 if (ext4_ext_more_to_rm(path + i)) { in ext4_ext_remove_space()
2182 i + 1, idx_pblock(path[i].p_idx)); in ext4_ext_remove_space()
2183 memset(path + i + 1, 0, sizeof(*path)); in ext4_ext_remove_space()
2184 bh = sb_bread(sb, idx_pblock(path[i].p_idx)); in ext4_ext_remove_space()
2199 path[i + 1].p_bh = bh; in ext4_ext_remove_space()
2203 path[i].p_block = le16_to_cpu(path[i].p_hdr->eh_entries); in ext4_ext_remove_space()
2207 if (path[i].p_hdr->eh_entries == 0 && i > 0) { in ext4_ext_remove_space()
2211 err = ext4_ext_rm_idx(handle, inode, path + i); in ext4_ext_remove_space()
2214 brelse(path[i].p_bh); in ext4_ext_remove_space()
2215 path[i].p_bh = NULL; in ext4_ext_remove_space()
2222 if (path->p_hdr->eh_entries == 0) { in ext4_ext_remove_space()
2227 err = ext4_ext_get_access(handle, inode, path); in ext4_ext_remove_space()
2232 err = ext4_ext_dirty(handle, inode, path); in ext4_ext_remove_space()
2236 ext4_ext_drop_refs(path); in ext4_ext_remove_space()
2237 kfree(path); in ext4_ext_remove_space()
2380 struct ext4_ext_path *path, in ext4_ext_convert_to_initialized() argument
2396 eh = path[depth].p_hdr; in ext4_ext_convert_to_initialized()
2397 ex = path[depth].p_ext; in ext4_ext_convert_to_initialized()
2407 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2419 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2454 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2460 err = ext4_ext_insert_extent(handle, inode, path, ex3); in ext4_ext_convert_to_initialized()
2468 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2490 ext4_ext_drop_refs(path); in ext4_ext_convert_to_initialized()
2491 path = ext4_ext_find_extent(inode, in ext4_ext_convert_to_initialized()
2492 iblock, path); in ext4_ext_convert_to_initialized()
2493 if (IS_ERR(path)) { in ext4_ext_convert_to_initialized()
2494 err = PTR_ERR(path); in ext4_ext_convert_to_initialized()
2498 ex = path[depth].p_ext; in ext4_ext_convert_to_initialized()
2500 path + depth); in ext4_ext_convert_to_initialized()
2504 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2516 err = ext4_ext_insert_extent(handle, inode, path, ex3); in ext4_ext_convert_to_initialized()
2525 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2544 ext4_ext_drop_refs(path); in ext4_ext_convert_to_initialized()
2545 path = ext4_ext_find_extent(inode, iblock, path); in ext4_ext_convert_to_initialized()
2546 if (IS_ERR(path)) { in ext4_ext_convert_to_initialized()
2547 err = PTR_ERR(path); in ext4_ext_convert_to_initialized()
2550 eh = path[depth].p_hdr; in ext4_ext_convert_to_initialized()
2551 ex = path[depth].p_ext; in ext4_ext_convert_to_initialized()
2555 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2574 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2608 ret = ext4_ext_try_to_merge(inode, path, ex2 - 1); in ext4_ext_convert_to_initialized()
2610 err = ext4_ext_correct_indexes(handle, inode, path); in ext4_ext_convert_to_initialized()
2623 ret = ext4_ext_try_to_merge(inode, path, ex2); in ext4_ext_convert_to_initialized()
2625 err = ext4_ext_correct_indexes(handle, inode, path); in ext4_ext_convert_to_initialized()
2631 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2634 err = ext4_ext_insert_extent(handle, inode, path, &newex); in ext4_ext_convert_to_initialized()
2643 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2656 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2683 struct ext4_ext_path *path = NULL; in ext4_ext_get_blocks() local
2723 path = ext4_ext_find_extent(inode, iblock, NULL); in ext4_ext_get_blocks()
2724 if (IS_ERR(path)) { in ext4_ext_get_blocks()
2725 err = PTR_ERR(path); in ext4_ext_get_blocks()
2726 path = NULL; in ext4_ext_get_blocks()
2737 BUG_ON(path[depth].p_ext == NULL && depth != 0); in ext4_ext_get_blocks()
2738 eh = path[depth].p_hdr; in ext4_ext_get_blocks()
2740 ex = path[depth].p_ext; in ext4_ext_get_blocks()
2783 path, iblock, in ext4_ext_get_blocks()
2803 ext4_ext_put_gap_in_cache(inode, path, iblock); in ext4_ext_get_blocks()
2812 err = ext4_ext_search_left(inode, path, &ar.lleft, &ar.pleft); in ext4_ext_get_blocks()
2816 err = ext4_ext_search_right(inode, path, &ar.lright, &ar.pright); in ext4_ext_get_blocks()
2836 err = ext4_ext_check_overlap(inode, &newex, path); in ext4_ext_get_blocks()
2844 ar.goal = ext4_ext_find_goal(inode, path, iblock); in ext4_ext_get_blocks()
2863 err = ext4_ext_insert_extent(handle, inode, path, &newex); in ext4_ext_get_blocks()
2895 ext4_ext_show_leaf(inode, path); in ext4_ext_get_blocks()
2900 if (path) { in ext4_ext_get_blocks()
2901 ext4_ext_drop_refs(path); in ext4_ext_get_blocks()
2902 kfree(path); in ext4_ext_get_blocks()
3085 static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path, in ext4_ext_fiemap_cb() argument
3138 ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK) in ext4_ext_fiemap_cb()