]> 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>
Fri, 30 Oct 2020 18:58:57 +0000 (14:58 -0400)
commitc566c6c9829b796b10b58c8a23a4d8e165e1d7af
tree1936b5351e2f33cdf9728b6426490d014e31b6f2
parent8361db6b456ce9d2aadf1dc71b230fe6bb16af68
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