Lines Matching refs:nr_entries

458 	int			*nr_entries)  in xfs_iext_split_node()  argument
470 *nr_entries = 0; in xfs_iext_split_node()
486 *nr_entries = nr_move; in xfs_iext_split_node()
488 *nr_entries = nr_keep; in xfs_iext_split_node()
504 int i, pos, nr_entries; in xfs_iext_insert_node() local
513 nr_entries = xfs_iext_node_nr_entries(node, pos); in xfs_iext_insert_node()
515 ASSERT(pos >= nr_entries || xfs_iext_key_cmp(node, pos, offset) != 0); in xfs_iext_insert_node()
516 ASSERT(nr_entries <= KEYS_PER_NODE); in xfs_iext_insert_node()
518 if (nr_entries == KEYS_PER_NODE) in xfs_iext_insert_node()
519 new = xfs_iext_split_node(&node, &pos, &nr_entries); in xfs_iext_insert_node()
525 if (node != new && pos == 0 && nr_entries > 0) in xfs_iext_insert_node()
528 for (i = nr_entries; i > pos; i--) { in xfs_iext_insert_node()
546 int *nr_entries) in xfs_iext_split_leaf() argument
558 *nr_entries = 0; in xfs_iext_split_leaf()
570 *nr_entries = nr_move; in xfs_iext_split_leaf()
572 *nr_entries = nr_keep; in xfs_iext_split_leaf()
639 int nr_entries, i; in xfs_iext_insert() local
648 nr_entries = xfs_iext_leaf_nr_entries(ifp, cur->leaf, cur->pos); in xfs_iext_insert()
649 ASSERT(nr_entries <= RECS_PER_LEAF); in xfs_iext_insert()
650 ASSERT(cur->pos >= nr_entries || in xfs_iext_insert()
653 if (nr_entries == RECS_PER_LEAF) in xfs_iext_insert()
654 new = xfs_iext_split_leaf(cur, &nr_entries); in xfs_iext_insert()
660 if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) { in xfs_iext_insert()
665 for (i = nr_entries; i > cur->pos; i--) in xfs_iext_insert()
681 int nr_entries) in xfs_iext_rebalance_node() argument
688 if (nr_entries == 0) in xfs_iext_rebalance_node()
695 if (nr_prev + nr_entries <= KEYS_PER_NODE) { in xfs_iext_rebalance_node()
696 for (i = 0; i < nr_entries; i++) { in xfs_iext_rebalance_node()
708 if (nr_entries + nr_next <= KEYS_PER_NODE) { in xfs_iext_rebalance_node()
715 node->keys[nr_entries + i] = next->keys[i]; in xfs_iext_rebalance_node()
716 node->ptrs[nr_entries + i] = next->ptrs[i]; in xfs_iext_rebalance_node()
734 int level = 2, pos, nr_entries, i; in xfs_iext_remove_node() local
744 nr_entries = xfs_iext_node_nr_entries(node, pos) - 1; in xfs_iext_remove_node()
746 for (i = pos; i < nr_entries; i++) { in xfs_iext_remove_node()
750 node->keys[nr_entries] = XFS_IEXT_KEY_INVALID; in xfs_iext_remove_node()
751 node->ptrs[nr_entries] = NULL; in xfs_iext_remove_node()
753 if (pos == 0 && nr_entries > 0) { in xfs_iext_remove_node()
758 if (nr_entries >= KEYS_PER_NODE / 2) in xfs_iext_remove_node()
774 node = xfs_iext_rebalance_node(parent, &pos, node, nr_entries); in xfs_iext_remove_node()
780 } else if (nr_entries == 1) { in xfs_iext_remove_node()
798 int nr_entries) in xfs_iext_rebalance_leaf() argument
805 if (nr_entries == 0) in xfs_iext_rebalance_leaf()
811 if (nr_prev + nr_entries <= RECS_PER_LEAF) { in xfs_iext_rebalance_leaf()
812 for (i = 0; i < nr_entries; i++) in xfs_iext_rebalance_leaf()
826 if (nr_entries + nr_next <= RECS_PER_LEAF) { in xfs_iext_rebalance_leaf()
833 leaf->recs[nr_entries + i] = in xfs_iext_rebalance_leaf()
839 cur->pos += nr_entries; in xfs_iext_rebalance_leaf()
875 int i, nr_entries; in xfs_iext_remove() local
885 nr_entries = xfs_iext_leaf_nr_entries(ifp, leaf, cur->pos) - 1; in xfs_iext_remove()
886 for (i = cur->pos; i < nr_entries; i++) in xfs_iext_remove()
888 xfs_iext_rec_clear(&leaf->recs[nr_entries]); in xfs_iext_remove()
891 if (cur->pos == 0 && nr_entries > 0) { in xfs_iext_remove()
895 } else if (cur->pos == nr_entries) { in xfs_iext_remove()
903 if (nr_entries >= RECS_PER_LEAF / 2) in xfs_iext_remove()
907 xfs_iext_rebalance_leaf(ifp, cur, leaf, offset, nr_entries); in xfs_iext_remove()
908 else if (nr_entries == 0) in xfs_iext_remove()