• Home
  • Raw
  • Download

Lines Matching refs:depth

155 	int depth;  in ext4_ext_find_goal()  local
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()
285 ext4_ext_max_entries(struct inode *inode, int depth) in ext4_ext_max_entries() argument
289 if (depth == ext_depth(inode)) { in ext4_ext_max_entries()
290 if (depth == 0) in ext4_ext_max_entries()
295 if (depth == 0) in ext4_ext_max_entries()
306 int depth) in __ext4_ext_check_header() argument
315 if (unlikely(le16_to_cpu(eh->eh_depth) != depth)) { in __ext4_ext_check_header()
323 max = ext4_ext_max_entries(inode, depth); in __ext4_ext_check_header()
340 max, le16_to_cpu(eh->eh_depth), depth); in __ext4_ext_check_header()
345 #define ext4_ext_check_header(inode, eh, depth) \ argument
346 __ext4_ext_check_header(__func__, inode, eh, depth)
371 int depth = ext_depth(inode); in ext4_ext_show_leaf() local
379 eh = path[depth].p_hdr; in ext4_ext_show_leaf()
395 int depth = path->p_depth; in ext4_ext_drop_refs() local
398 for (i = 0; i <= depth; i++, path++) in ext4_ext_drop_refs()
546 short int depth, i, ppos = 0, alloc = 0; in ext4_ext_find_extent() local
549 depth = ext_depth(inode); in ext4_ext_find_extent()
550 if (ext4_ext_check_header(inode, eh, depth)) in ext4_ext_find_extent()
556 path = kzalloc(sizeof(struct ext4_ext_path) * (depth + 2), in ext4_ext_find_extent()
565 i = depth; in ext4_ext_find_extent()
582 BUG_ON(ppos > depth); in ext4_ext_find_extent()
683 int depth = ext_depth(inode); in ext4_ext_split() local
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()
723 ablocks = kzalloc(sizeof(ext4_fsblk_t) * depth, GFP_NOFS); in ext4_ext_split()
728 ext_debug("allocate %d blocks for indexes/leaf\n", depth - at); in ext4_ext_split()
729 for (a = 0; a < depth - at; a++) { 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()
804 k = depth - at - 1; in ext4_ext_split()
810 i = depth - 1; in ext4_ext_split()
829 neh->eh_depth = cpu_to_le16(depth - i); in ext4_ext_split()
897 for (i = 0; i < depth; i++) { in ext4_ext_split()
1006 int depth, i, err = 0; in ext4_ext_create_new_leaf() local
1009 i = depth = ext_depth(inode); in ext4_ext_create_new_leaf()
1012 curp = path + depth; in ext4_ext_create_new_leaf()
1054 depth = ext_depth(inode); 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()
1078 int depth, ee_len; in ext4_ext_search_left() local
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()
1095 while (--depth >= 0) { 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()
1125 int depth; /* Note, NOT eh_depth; depth from top of tree */ in ext4_ext_search_right() local
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()
1143 while (--depth >= 0) { 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()
1163 while (--depth >= 0) { 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()
1218 int depth; in ext4_ext_next_allocated_block() local
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()
1226 while (depth >= 0) { 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()
1238 depth--; in ext4_ext_next_allocated_block()
1251 int depth; in ext4_ext_next_leaf_block() local
1254 depth = path->p_depth; in ext4_ext_next_leaf_block()
1257 if (depth == 0) in ext4_ext_next_leaf_block()
1261 depth--; in ext4_ext_next_leaf_block()
1263 while (depth >= 0) { 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()
1268 depth--; in ext4_ext_next_leaf_block()
1284 int depth = ext_depth(inode); in ext4_ext_correct_indexes() local
1289 eh = path[depth].p_hdr; in ext4_ext_correct_indexes()
1290 ex = path[depth].p_ext; in ext4_ext_correct_indexes()
1294 if (depth == 0) { in ext4_ext_correct_indexes()
1307 k = depth - 1; in ext4_ext_correct_indexes()
1308 border = path[depth].p_ext->ee_block; in ext4_ext_correct_indexes()
1387 unsigned int depth, len; in ext4_ext_try_to_merge() local
1391 depth = ext_depth(inode); in ext4_ext_try_to_merge()
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()
1435 unsigned int depth, len1; in ext4_ext_check_overlap() local
1440 depth = ext_depth(inode); in ext4_ext_check_overlap()
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()
1485 int depth, len, err; in ext4_ext_insert_extent() local
1490 depth = ext_depth(inode); in ext4_ext_insert_extent()
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()
1521 depth = ext_depth(inode); in ext4_ext_insert_extent()
1522 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
1537 eh = npath[depth].p_hdr; in ext4_ext_insert_extent()
1555 depth = ext_depth(inode); 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()
1619 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_insert_extent()
1639 int depth, exists, err = 0; in ext4_ext_walk_space() local
1654 depth = ext_depth(inode); 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()
1720 if (ext_depth(inode) != depth) { in ext4_ext_walk_space()
1759 int depth = ext_depth(inode); in ext4_ext_put_gap_in_cache() local
1764 ex = path[depth].p_ext; in ext4_ext_put_gap_in_cache()
1869 int depth = ext_depth(inode); in ext4_ext_calc_credits_for_single_extent() local
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()
1906 int depth = ext_depth(inode); in ext4_ext_index_trans_blocks() local
1909 index = depth * 2; in ext4_ext_index_trans_blocks()
1911 index = depth * 3; in ext4_ext_index_trans_blocks()
1972 int depth = ext_depth(inode), credits; in ext4_ext_rm_leaf() local
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()
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()
2116 int depth = ext_depth(inode); in ext4_ext_remove_space() local
2124 handle = ext4_journal_start(inode, depth + 1); in ext4_ext_remove_space()
2134 path = kzalloc(sizeof(struct ext4_ext_path) * (depth + 1), GFP_NOFS); 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()
2147 if (i == depth) { in ext4_ext_remove_space()
2190 if (WARN_ON(i + 1 > depth)) { in ext4_ext_remove_space()
2195 depth - i - 1)) { in ext4_ext_remove_space()
2390 unsigned int allocated, ee_len, depth; in ext4_ext_convert_to_initialized() local
2395 depth = ext_depth(inode); in ext4_ext_convert_to_initialized()
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()
2468 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2489 depth = ext_depth(inode); 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()
2525 ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
2543 depth = newdepth; 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()
2613 depth = ext_depth(inode); in ext4_ext_convert_to_initialized()
2631 err = ext4_ext_dirty(handle, inode, path + depth); 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()
2687 int err = 0, depth, ret, cache_type; in ext4_ext_get_blocks() local
2730 depth = ext_depth(inode); 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()