Lines Matching defs:el
586 node->el = NULL;
629 dest->p_node[i].el = src->p_node[i].el;
651 dest->p_node[i].el = src->p_node[i].el;
654 src->p_node[i].el = NULL;
677 path->p_node[index].el = &eb->h_list;
766 int ocfs2_search_extent_list(struct ocfs2_extent_list *el, u32 v_cluster)
773 for(i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) {
774 rec = &el->l_recs[i];
777 clusters = ocfs2_rec_clusters(el, rec);
951 struct ocfs2_extent_list *el = NULL;
956 el = et->et_root_el;
967 el = &eb->h_list;
970 if (el->l_tree_depth != 0) {
975 le16_to_cpu(el->l_tree_depth));
979 retval = le16_to_cpu(el->l_count) - le16_to_cpu(el->l_next_free_rec);
1084 static inline u32 ocfs2_sum_rightmost_rec(struct ocfs2_extent_list *el)
1088 i = le16_to_cpu(el->l_next_free_rec) - 1;
1090 return le32_to_cpu(el->l_recs[i].e_cpos) +
1091 ocfs2_rec_clusters(el, &el->l_recs[i]);
1103 struct ocfs2_extent_list *el;
1130 el = path_leaf_el(path);
1131 rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec) - 1];
1163 struct ocfs2_extent_list *el;
1170 el = &eb->h_list;
1172 el = et->et_root_el;
1175 BUG_ON(!el->l_tree_depth);
1177 new_blocks = le16_to_cpu(el->l_tree_depth);
1310 /* Link the new branch into the rest of the tree (el will
1312 i = le16_to_cpu(el->l_next_free_rec);
1313 el->l_recs[i].e_blkno = cpu_to_le64(next_blkno);
1314 el->l_recs[i].e_cpos = cpu_to_le32(new_cpos);
1315 el->l_recs[i].e_int_clusters = 0;
1316 le16_add_cpu(&el->l_next_free_rec, 1);
1462 struct ocfs2_extent_list *el;
1468 el = et->et_root_el;
1470 while(le16_to_cpu(el->l_tree_depth) > 1) {
1471 if (le16_to_cpu(el->l_next_free_rec) == 0) {
1477 i = le16_to_cpu(el->l_next_free_rec) - 1;
1478 blkno = le64_to_cpu(el->l_recs[i].e_blkno);
1496 el = &eb->h_list;
1498 if (le16_to_cpu(el->l_next_free_rec) <
1499 le16_to_cpu(el->l_count)) {
1508 el = et->et_root_el;
1509 if (!lowest_bh && (el->l_next_free_rec == el->l_count))
1534 struct ocfs2_extent_list *el = et->et_root_el;
1535 int depth = le16_to_cpu(el->l_tree_depth);
1600 static void ocfs2_shift_records_right(struct ocfs2_extent_list *el)
1602 int next_free = le16_to_cpu(el->l_next_free_rec);
1603 int count = le16_to_cpu(el->l_count);
1612 memmove(&el->l_recs[1], &el->l_recs[0], num_bytes);
1615 static void ocfs2_rotate_leaf(struct ocfs2_extent_list *el,
1622 next_free = le16_to_cpu(el->l_next_free_rec);
1623 has_empty = ocfs2_is_empty_extent(&el->l_recs[0]);
1628 BUG_ON(el->l_next_free_rec == el->l_count && !has_empty);
1641 el->l_recs[i] = el->l_recs[i+1];
1650 rec = &el->l_recs[i];
1659 le16_to_cpu(el->l_count));
1662 BUG_ON(insert_index >= le16_to_cpu(el->l_count));
1669 BUG_ON(next_free >= le16_to_cpu(el->l_count));
1673 memmove(&el->l_recs[insert_index + 1],
1674 &el->l_recs[insert_index],
1684 el->l_next_free_rec = cpu_to_le16(next_free);
1688 BUG_ON(le16_to_cpu(el->l_next_free_rec) > le16_to_cpu(el->l_count));
1690 el->l_recs[insert_index] = *insert_rec;
1694 static void ocfs2_remove_empty_extent(struct ocfs2_extent_list *el)
1696 int size, num_recs = le16_to_cpu(el->l_next_free_rec);
1700 if (ocfs2_is_empty_extent(&el->l_recs[0])) {
1703 memmove(&el->l_recs[0], &el->l_recs[1], size);
1704 memset(&el->l_recs[num_recs], 0,
1706 el->l_next_free_rec = cpu_to_le16(num_recs);
1717 static void ocfs2_create_empty_extent(struct ocfs2_extent_list *el)
1719 int next_free = le16_to_cpu(el->l_next_free_rec);
1721 BUG_ON(le16_to_cpu(el->l_tree_depth) != 0);
1726 if (ocfs2_is_empty_extent(&el->l_recs[0]))
1729 mlog_bug_on_msg(el->l_count == el->l_next_free_rec,
1732 le16_to_cpu(el->l_count),
1733 le16_to_cpu(el->l_tree_depth));
1735 ocfs2_shift_records_right(el);
1738 le16_add_cpu(&el->l_next_free_rec, 1);
1739 memset(&el->l_recs[0], 0, sizeof(struct ocfs2_extent_rec));
1801 struct ocfs2_extent_list *el;
1804 el = root_el;
1805 while (el->l_tree_depth) {
1806 if (le16_to_cpu(el->l_next_free_rec) == 0) {
1810 le16_to_cpu(el->l_tree_depth));
1816 for(i = 0; i < le16_to_cpu(el->l_next_free_rec) - 1; i++) {
1817 rec = &el->l_recs[i];
1825 ocfs2_rec_clusters(el, rec);
1830 blkno = le64_to_cpu(el->l_recs[i].e_blkno);
1835 le16_to_cpu(el->l_tree_depth), i);
1849 el = &eb->h_list;
1851 if (le16_to_cpu(el->l_next_free_rec) >
1852 le16_to_cpu(el->l_count)) {
1857 le16_to_cpu(el->l_next_free_rec),
1858 le16_to_cpu(el->l_count));
1913 struct ocfs2_extent_list *el = &eb->h_list;
1917 if (le16_to_cpu(el->l_tree_depth) == 0) {
2048 struct ocfs2_extent_list *el, *left_el, *right_el;
2075 el = left_path->p_node[i].el;
2077 left_rec = &el->l_recs[idx];
2079 el = right_path->p_node[i].el;
2080 right_rec = &el->l_recs[0];
2091 left_el = left_path->p_node[i].el;
2092 right_el = right_path->p_node[i].el;
2100 el = left_path->p_node[subtree_index].el;
2101 left_el = left_path->p_node[subtree_index + 1].el;
2102 right_el = right_path->p_node[subtree_index + 1].el;
2104 ocfs2_adjust_root_records(el, left_el, right_el,
2220 struct ocfs2_extent_list *el;
2231 el = path->p_node[i].el;
2237 for(j = 0; j < le16_to_cpu(el->l_next_free_rec); j++) {
2238 if (le64_to_cpu(el->l_recs[j].e_blkno) == blkno) {
2257 *cpos = le32_to_cpu(el->l_recs[j - 1].e_cpos);
2258 *cpos = *cpos + ocfs2_rec_clusters(el,
2259 &el->l_recs[j - 1]);
2328 static int ocfs2_leftmost_rec_contains(struct ocfs2_extent_list *el, u32 cpos)
2330 int next_free = le16_to_cpu(el->l_next_free_rec);
2337 rec = &el->l_recs[0];
2342 rec = &el->l_recs[1];
2345 range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec);
2534 struct ocfs2_extent_list *el;
2548 el = &eb->h_list;
2549 BUG_ON(le16_to_cpu(el->l_next_free_rec) == 0);
2550 idx = le16_to_cpu(el->l_next_free_rec) - 1;
2551 rec = &el->l_recs[idx];
2552 range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec);
2555 el = path->p_node[i].el;
2556 idx = le16_to_cpu(el->l_next_free_rec) - 1;
2557 rec = &el->l_recs[idx];
2575 struct ocfs2_extent_list *el;
2586 el = &eb->h_list;
2587 if (le16_to_cpu(el->l_next_free_rec) > 1) {
2593 le16_to_cpu(el->l_next_free_rec));
2600 el->l_next_free_rec = 0;
2601 memset(&el->l_recs[0], 0, sizeof(struct ocfs2_extent_rec));
2622 struct ocfs2_extent_list *root_el = left_path->p_node[subtree_index].el;
2815 struct ocfs2_extent_list *el;
2829 el = path->p_node[i].el;
2835 next_free = le16_to_cpu(el->l_next_free_rec);
2836 for(j = 0; j < le16_to_cpu(el->l_next_free_rec); j++) {
2837 if (le64_to_cpu(el->l_recs[j].e_blkno) == blkno) {
2856 *cpos = le32_to_cpu(el->l_recs[j + 1].e_cpos);
2885 struct ocfs2_extent_list *el = path_leaf_el(path);
2887 if (!ocfs2_is_empty_extent(&el->l_recs[0]))
2897 ocfs2_remove_empty_extent(el);
3030 struct ocfs2_extent_list *el;
3095 el = et->et_root_el;
3096 el->l_tree_depth = 0;
3097 el->l_next_free_rec = 0;
3098 memset(&el->l_recs[0], 0, sizeof(struct ocfs2_extent_rec));
3158 struct ocfs2_extent_list *el;
3160 el = path_leaf_el(path);
3161 if (!ocfs2_is_empty_extent(&el->l_recs[0]))
3190 el = &eb->h_list;
3197 if (le16_to_cpu(el->l_next_free_rec) > 1)
3200 if (le16_to_cpu(el->l_next_free_rec) == 0) {
3261 static void ocfs2_cleanup_merge(struct ocfs2_extent_list *el,
3264 struct ocfs2_extent_rec *rec = &el->l_recs[index];
3279 BUG_ON(ocfs2_is_empty_extent(&el->l_recs[0]));
3281 memmove(&el->l_recs[1], &el->l_recs[0], size);
3289 memset(&el->l_recs[0], 0, sizeof(struct ocfs2_extent_rec));
3360 struct ocfs2_extent_list *el = path_leaf_el(left_path);
3364 BUG_ON(index >= le16_to_cpu(el->l_next_free_rec));
3365 left_rec = &el->l_recs[index];
3367 if (index == le16_to_cpu(el->l_next_free_rec) - 1 &&
3368 le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) {
3428 BUG_ON(index == le16_to_cpu(el->l_next_free_rec) - 1);
3429 right_rec = &el->l_recs[index + 1];
3447 ocfs2_cleanup_merge(el, index);
3524 struct ocfs2_extent_list *el = path_leaf_el(right_path);
3532 right_rec = &el->l_recs[index];
3589 left_rec = &el->l_recs[index - 1];
3590 if (ocfs2_is_empty_extent(&el->l_recs[0]))
3615 ocfs2_cleanup_merge(el, index);
3627 le16_to_cpu(el->l_next_free_rec) == 1) {
3668 struct ocfs2_extent_list *el = path_leaf_el(path);
3669 struct ocfs2_extent_rec *rec = &el->l_recs[split_index];
3695 rec = &el->l_recs[split_index];
3728 BUG_ON(!ocfs2_is_empty_extent(&el->l_recs[0]));
3746 rec = &el->l_recs[split_index];
3867 struct ocfs2_extent_list *el,
3874 BUG_ON(le16_to_cpu(el->l_tree_depth) != 0);
3877 i = ocfs2_search_extent_list(el, le32_to_cpu(insert_rec->e_cpos));
3879 rec = &el->l_recs[i];
3890 rec = &el->l_recs[i];
3903 if (le16_to_cpu(el->l_next_free_rec) == 0 ||
3904 ((le16_to_cpu(el->l_next_free_rec) == 1) &&
3905 ocfs2_is_empty_extent(&el->l_recs[0]))) {
3906 el->l_recs[0] = *insert_rec;
3907 el->l_next_free_rec = cpu_to_le16(1);
3915 i = le16_to_cpu(el->l_next_free_rec) - 1;
3916 rec = &el->l_recs[i];
3921 mlog_bug_on_msg(le16_to_cpu(el->l_next_free_rec) >=
3922 le16_to_cpu(el->l_count),
3927 le16_to_cpu(el->l_tree_depth),
3928 le16_to_cpu(el->l_count),
3929 le16_to_cpu(el->l_next_free_rec),
3930 le32_to_cpu(el->l_recs[i].e_cpos),
3931 le16_to_cpu(el->l_recs[i].e_leaf_clusters),
3935 el->l_recs[i] = *insert_rec;
3936 le16_add_cpu(&el->l_next_free_rec, 1);
3951 ocfs2_rotate_leaf(el, insert_rec);
3961 struct ocfs2_extent_list *el;
3969 el = path->p_node[i].el;
3971 next_free = le16_to_cpu(el->l_next_free_rec);
3979 rec = &el->l_recs[next_free - 1];
3998 struct ocfs2_extent_list *el;
4014 el = path_leaf_el(right_path);
4015 next_free = le16_to_cpu(el->l_next_free_rec);
4017 (next_free == 1 && ocfs2_is_empty_extent(&el->l_recs[0]))) {
4084 struct ocfs2_extent_list *left_el = NULL, *right_el, *insert_el, *el;
4091 el = right_el;
4093 index = ocfs2_search_extent_list(el, cpos);
4096 BUG_ON(ocfs2_is_empty_extent(&el->l_recs[0]));
4128 el = left_el;
4142 el = left_el;
4144 index = ocfs2_search_extent_list(el, cpos);
4148 rec = &el->l_recs[index];
4252 struct ocfs2_extent_list *el;
4254 el = et->et_root_el;
4263 if (le16_to_cpu(el->l_tree_depth) == 0) {
4264 ocfs2_insert_at_leaf(et, insert_rec, el, type);
4357 struct ocfs2_extent_list *el, int index,
4372 rec = &el->l_recs[index - 1];
4415 if (split_rec->e_cpos == el->l_recs[index].e_cpos)
4423 if (index < (le16_to_cpu(el->l_next_free_rec) - 1))
4424 rec = &el->l_recs[index + 1];
4425 else if (le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count) &&
4485 struct ocfs2_extent_list *el,
4491 BUG_ON(le16_to_cpu(el->l_tree_depth) != 0);
4493 for(i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) {
4494 contig_type = ocfs2_et_extent_contig(et, &el->l_recs[i],
4505 &el->l_recs[insert->ins_contig_index];
4530 struct ocfs2_extent_list *el,
4539 BUG_ON(le16_to_cpu(el->l_tree_depth) != 0);
4541 if (!el->l_next_free_rec)
4544 if (ocfs2_is_empty_extent(&el->l_recs[0])) {
4546 if (le16_to_cpu(el->l_next_free_rec) == 1)
4550 i = le16_to_cpu(el->l_next_free_rec) - 1;
4551 rec = &el->l_recs[i];
4584 struct ocfs2_extent_list *el;
4590 el = et->et_root_el;
4591 insert->ins_tree_depth = le16_to_cpu(el->l_tree_depth);
4593 if (el->l_tree_depth) {
4608 el = &eb->h_list;
4619 *free_records = le16_to_cpu(el->l_count) -
4620 le16_to_cpu(el->l_next_free_rec);
4623 ocfs2_figure_contig_type(et, insert, el, insert_rec);
4624 ocfs2_figure_appending_type(insert, el, insert_rec);
4647 el = path_leaf_el(path);
4657 ocfs2_figure_contig_type(et, insert, el, insert_rec);
4688 ocfs2_figure_appending_type(insert, el, insert_rec);
4989 struct ocfs2_extent_list *el;
5003 el = path_leaf_el(path);
5004 split_index = ocfs2_search_extent_list(el, cpos);
5023 struct ocfs2_extent_list *el,
5036 el->l_recs[split_index] = *split_rec;
5071 struct ocfs2_extent_list *el = path_leaf_el(path);
5073 struct ocfs2_extent_rec *rec = &el->l_recs[split_index];
5084 ret = ocfs2_figure_merge_contig_type(et, path, el,
5114 ctxt.c_has_empty_extent = ocfs2_is_empty_extent(&el->l_recs[0]);
5122 ret = ocfs2_replace_extent_rec(handle, et, path, el,
5167 struct ocfs2_extent_list *el;
5182 el = path_leaf_el(left_path);
5184 index = ocfs2_search_extent_list(el, cpos);
5195 rec = &el->l_recs[index];
5286 struct ocfs2_extent_list *rightmost_el, *el;
5294 el = path_leaf_el(path);
5295 rec = &el->l_recs[index];
5358 struct ocfs2_extent_list *el = path_leaf_el(path);
5362 if (ocfs2_is_empty_extent(&el->l_recs[0]) && index > 0) {
5381 if (index == (le16_to_cpu(el->l_next_free_rec) - 1) &&
5394 rec = &el->l_recs[index];
5416 if (left_cpos && le16_to_cpu(el->l_next_free_rec) > 1) {
5453 rec_range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec);
5460 ocfs2_cleanup_merge(el, index);
5462 next_free = le16_to_cpu(el->l_next_free_rec);
5468 rec = &el->l_recs[next_free - 1];
5520 struct ocfs2_extent_list *el;
5542 el = path_leaf_el(path);
5543 index = ocfs2_search_extent_list(el, cpos);
5569 rec = &el->l_recs[index];
5570 rec_range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec);
5578 ocfs2_rec_clusters(el, rec));
5607 el = path_leaf_el(path);
5608 index = ocfs2_search_extent_list(el, cpos);
5622 rec = &el->l_recs[index];
5624 ocfs2_rec_clusters(el, rec);
5630 ocfs2_rec_clusters(el, rec));
7229 struct ocfs2_extent_list *el;
7280 * By now, el will point to the extent list on the bottom most
7290 el = path_leaf_el(path);
7291 if (le16_to_cpu(el->l_next_free_rec) == 0) {
7300 i = le16_to_cpu(el->l_next_free_rec) - 1;
7301 rec = &el->l_recs[i];
7303 range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el, rec);
7333 trunc_len = ocfs2_rec_clusters(el, rec);