Lines Matching defs:leaf

98  * There are two types of blocks in the btree: leaf and inner (non-leaf) blocks.
100 * The leaf blocks are made up by %KEYS_PER_NODE extent records, which each
103 * leaf blocks (if there are any).
105 * The inner (non-leaf) blocks first contain KEYS_PER_NODE lookup keys, followed
142 return &cur->leaf->recs[cur->pos];
148 if (!cur->leaf)
202 cur->leaf = xfs_iext_find_first_leaf(ifp);
212 cur->leaf = xfs_iext_find_last_leaf(ifp);
213 if (!cur->leaf) {
219 if (xfs_iext_rec_is_empty(&cur->leaf->recs[i]))
230 if (!cur->leaf) {
241 cur->leaf->next) {
242 cur->leaf = cur->leaf->next;
252 if (!cur->leaf) {
268 if (ifp->if_height > 1 && cur->leaf->prev) {
269 cur->leaf = cur->leaf->prev;
376 struct xfs_iext_leaf *leaf,
382 if (xfs_iext_rec_is_empty(&leaf->recs[i]))
391 struct xfs_iext_leaf *leaf,
394 return leaf->recs[n].lo & XFS_IEXT_STARTOFF_MASK;
544 struct xfs_iext_leaf *leaf = cur->leaf;
552 cur->leaf = new;
559 new->recs[i] = leaf->recs[nr_keep + i];
560 xfs_iext_rec_clear(&leaf->recs[nr_keep + i]);
564 cur->leaf = new;
571 if (leaf->next)
572 leaf->next->prev = new;
573 new->next = leaf->next;
574 new->prev = leaf;
575 leaf->next = new;
590 cur->leaf = ifp->if_u1.if_root;
609 cur->leaf = new;
643 nr_entries = xfs_iext_leaf_nr_entries(ifp, cur->leaf, cur->pos);
655 if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) {
656 xfs_iext_update_node(ifp, xfs_iext_leaf_key(cur->leaf, 0),
657 offset, 1, cur->leaf);
661 cur->leaf->recs[i] = cur->leaf->recs[i - 1];
791 struct xfs_iext_leaf *leaf,
803 if (leaf->prev) {
804 int nr_prev = xfs_iext_leaf_nr_entries(ifp, leaf->prev, 0), i;
808 leaf->prev->recs[nr_prev + i] = leaf->recs[i];
810 if (cur->leaf == leaf) {
811 cur->leaf = leaf->prev;
818 if (leaf->next) {
819 int nr_next = xfs_iext_leaf_nr_entries(ifp, leaf->next, 0), i;
828 leaf->recs[nr_entries + i] =
829 leaf->next->recs[i];
832 if (cur->leaf == leaf->next) {
833 cur->leaf = leaf;
837 offset = xfs_iext_leaf_key(leaf->next, 0);
838 leaf = leaf->next;
845 if (leaf->prev)
846 leaf->prev->next = leaf->next;
847 if (leaf->next)
848 leaf->next->prev = leaf->prev;
849 xfs_iext_remove_node(ifp, offset, leaf);
868 struct xfs_iext_leaf *leaf = cur->leaf;
869 xfs_fileoff_t offset = xfs_iext_leaf_key(leaf, 0);
880 nr_entries = xfs_iext_leaf_nr_entries(ifp, leaf, cur->pos) - 1;
882 leaf->recs[i] = leaf->recs[i + 1];
883 xfs_iext_rec_clear(&leaf->recs[nr_entries]);
887 xfs_iext_update_node(ifp, offset, xfs_iext_leaf_key(leaf, 0), 1,
888 leaf);
889 offset = xfs_iext_leaf_key(leaf, 0);
891 if (ifp->if_height > 1 && leaf->next)
892 cur->leaf = leaf->next;
894 cur->leaf = NULL;
902 xfs_iext_rebalance_leaf(ifp, cur, leaf, offset, nr_entries);
928 cur->leaf = xfs_iext_find_level(ifp, offset, 1);
929 if (!cur->leaf) {
944 if (ifp->if_height == 1 || !cur->leaf->next)
946 cur->leaf = cur->leaf->next;
994 new->br_startoff, 1, cur->leaf);