]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Reduce recursion and fix set10 testcase.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 11 Feb 2020 02:35:09 +0000 (21:35 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:28:20 +0000 (12:28 -0500)
commit5bbe0d9322013b82aa9bbe0780d3cd044f0589e2
tree6744b38dc1cd5dbe3a90c8abf5e607391514b685
parentc22e7f5038bc42f9f7cd9b47a4d4cfcfed76ffaa
maple_tree:  Reduce recursion and fix set10 testcase.

1. Remove ma_cp/mas_copy in favour of mas_append and friends.
  It turns out it is cleaner to append nodes together than to try and
  copy parts and glue them together as initially designed.

2. Clean up debug/test code and BUG_ON statements.

3. Add *mte_get_rcu_sanitized() to return NULL if it will be coalesced.

4. mas_set_safe_pivot is no longer recursive.

5. mas_data_end has been altered numerous times.

6. Add mas_get_range() - get the range of a given slot.

7. Drop mas_ma_update_gap/mas_ma_cp in favour of the above mentioned
appending operations.

8. mas_parent_gap() is no longer recursive.

9. mas_update_gap() has been updated to use new mas_parent_gap.

10. mas_split() uses mas_append and friends.

11. __mas_add_slot_cnt() is used to calculate the slots needed when
adding a value - much reliable than mas_data_end for this usecase.

12. mas_rebalance() is no longer recursive.

13. Added validation code for parent slot

14. Doubled testcases and fixed a missing mas_destroy() call.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
include/linux/maple_tree.h
lib/maple_tree.c
lib/test_maple_tree.c