Lines Matching refs:nr_entries
454 int *nr_entries) in xfs_iext_split_node() argument
466 *nr_entries = 0; in xfs_iext_split_node()
482 *nr_entries = nr_move; in xfs_iext_split_node()
484 *nr_entries = nr_keep; in xfs_iext_split_node()
500 int i, pos, nr_entries; in xfs_iext_insert_node() local
509 nr_entries = xfs_iext_node_nr_entries(node, pos); in xfs_iext_insert_node()
511 ASSERT(pos >= nr_entries || xfs_iext_key_cmp(node, pos, offset) != 0); in xfs_iext_insert_node()
512 ASSERT(nr_entries <= KEYS_PER_NODE); in xfs_iext_insert_node()
514 if (nr_entries == KEYS_PER_NODE) in xfs_iext_insert_node()
515 new = xfs_iext_split_node(&node, &pos, &nr_entries); in xfs_iext_insert_node()
521 if (node != new && pos == 0 && nr_entries > 0) in xfs_iext_insert_node()
524 for (i = nr_entries; i > pos; i--) { in xfs_iext_insert_node()
542 int *nr_entries) in xfs_iext_split_leaf() argument
554 *nr_entries = 0; in xfs_iext_split_leaf()
566 *nr_entries = nr_move; in xfs_iext_split_leaf()
568 *nr_entries = nr_keep; in xfs_iext_split_leaf()
634 int nr_entries, i; in xfs_iext_insert() local
643 nr_entries = xfs_iext_leaf_nr_entries(ifp, cur->leaf, cur->pos); in xfs_iext_insert()
644 ASSERT(nr_entries <= RECS_PER_LEAF); in xfs_iext_insert()
645 ASSERT(cur->pos >= nr_entries || in xfs_iext_insert()
648 if (nr_entries == RECS_PER_LEAF) in xfs_iext_insert()
649 new = xfs_iext_split_leaf(cur, &nr_entries); in xfs_iext_insert()
655 if (cur->leaf != new && cur->pos == 0 && nr_entries > 0) { in xfs_iext_insert()
660 for (i = nr_entries; i > cur->pos; i--) in xfs_iext_insert()
676 int nr_entries) in xfs_iext_rebalance_node() argument
683 if (nr_entries == 0) in xfs_iext_rebalance_node()
690 if (nr_prev + nr_entries <= KEYS_PER_NODE) { in xfs_iext_rebalance_node()
691 for (i = 0; i < nr_entries; i++) { in xfs_iext_rebalance_node()
703 if (nr_entries + nr_next <= KEYS_PER_NODE) { in xfs_iext_rebalance_node()
710 node->keys[nr_entries + i] = next->keys[i]; in xfs_iext_rebalance_node()
711 node->ptrs[nr_entries + i] = next->ptrs[i]; in xfs_iext_rebalance_node()
729 int level = 2, pos, nr_entries, i; in xfs_iext_remove_node() local
739 nr_entries = xfs_iext_node_nr_entries(node, pos) - 1; in xfs_iext_remove_node()
741 for (i = pos; i < nr_entries; i++) { in xfs_iext_remove_node()
745 node->keys[nr_entries] = XFS_IEXT_KEY_INVALID; in xfs_iext_remove_node()
746 node->ptrs[nr_entries] = NULL; in xfs_iext_remove_node()
748 if (pos == 0 && nr_entries > 0) { in xfs_iext_remove_node()
753 if (nr_entries >= KEYS_PER_NODE / 2) in xfs_iext_remove_node()
769 node = xfs_iext_rebalance_node(parent, &pos, node, nr_entries); in xfs_iext_remove_node()
775 } else if (nr_entries == 1) { in xfs_iext_remove_node()
793 int nr_entries) in xfs_iext_rebalance_leaf() argument
800 if (nr_entries == 0) in xfs_iext_rebalance_leaf()
806 if (nr_prev + nr_entries <= RECS_PER_LEAF) { in xfs_iext_rebalance_leaf()
807 for (i = 0; i < nr_entries; i++) in xfs_iext_rebalance_leaf()
821 if (nr_entries + nr_next <= RECS_PER_LEAF) { in xfs_iext_rebalance_leaf()
828 leaf->recs[nr_entries + i] = in xfs_iext_rebalance_leaf()
834 cur->pos += nr_entries; in xfs_iext_rebalance_leaf()
870 int i, nr_entries; in xfs_iext_remove() local
880 nr_entries = xfs_iext_leaf_nr_entries(ifp, leaf, cur->pos) - 1; in xfs_iext_remove()
881 for (i = cur->pos; i < nr_entries; i++) in xfs_iext_remove()
883 xfs_iext_rec_clear(&leaf->recs[nr_entries]); in xfs_iext_remove()
886 if (cur->pos == 0 && nr_entries > 0) { in xfs_iext_remove()
890 } else if (cur->pos == nr_entries) { in xfs_iext_remove()
898 if (nr_entries >= RECS_PER_LEAF / 2) in xfs_iext_remove()
902 xfs_iext_rebalance_leaf(ifp, cur, leaf, offset, nr_entries); in xfs_iext_remove()
903 else if (nr_entries == 0) in xfs_iext_remove()