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;
551 struct xfs_iext_leaf *leaf = cur->leaf;
559 cur->leaf = new;
566 new->recs[i] = leaf->recs[nr_keep + i];
567 xfs_iext_rec_clear(&leaf->recs[nr_keep + i]);
571 cur->leaf = new;
578 if (leaf->next)
579 leaf->next->prev = new;
580 new->next = leaf->next;
581 new->prev = leaf;
582 leaf->next = new;
597 cur->leaf = ifp->if_data;
617 cur->leaf = new;
649 nr_entries = xfs_iext_leaf_nr_entries(ifp, cur->leaf, cur->pos);
661 if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) {
662 xfs_iext_update_node(ifp, xfs_iext_leaf_key(cur->leaf, 0),
663 offset, 1, cur->leaf);
667 cur->leaf->recs[i] = cur->leaf->recs[i - 1];
808 struct xfs_iext_leaf *leaf,
820 if (leaf->prev) {
821 int nr_prev = xfs_iext_leaf_nr_entries(ifp, leaf->prev, 0), i;
825 leaf->prev->recs[nr_prev + i] = leaf->recs[i];
827 if (cur->leaf == leaf) {
828 cur->leaf = leaf->prev;
835 if (leaf->next) {
836 int nr_next = xfs_iext_leaf_nr_entries(ifp, leaf->next, 0), i;
845 leaf->recs[nr_entries + i] =
846 leaf->next->recs[i];
849 if (cur->leaf == leaf->next) {
850 cur->leaf = leaf;
854 offset = xfs_iext_leaf_key(leaf->next, 0);
855 leaf = leaf->next;
862 if (leaf->prev)
863 leaf->prev->next = leaf->next;
864 if (leaf->next)
865 leaf->next->prev = leaf->prev;
866 xfs_iext_remove_node(ifp, offset, leaf);
885 struct xfs_iext_leaf *leaf = cur->leaf;
886 xfs_fileoff_t offset = xfs_iext_leaf_key(leaf, 0);
897 nr_entries = xfs_iext_leaf_nr_entries(ifp, leaf, cur->pos) - 1;
899 leaf->recs[i] = leaf->recs[i + 1];
900 xfs_iext_rec_clear(&leaf->recs[nr_entries]);
904 xfs_iext_update_node(ifp, offset, xfs_iext_leaf_key(leaf, 0), 1,
905 leaf);
906 offset = xfs_iext_leaf_key(leaf, 0);
908 if (ifp->if_height > 1 && leaf->next)
909 cur->leaf = leaf->next;
911 cur->leaf = NULL;
919 xfs_iext_rebalance_leaf(ifp, cur, leaf, offset, nr_entries);
945 cur->leaf = xfs_iext_find_level(ifp, offset, 1);
946 if (!cur->leaf) {
961 if (ifp->if_height == 1 || !cur->leaf->next)
963 cur->leaf = cur->leaf->next;
1011 new->br_startoff, 1, cur->leaf);