]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rename rebalance_dest to multi_dst
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 16 Sep 2025 17:56:12 +0000 (13:56 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 16 Sep 2025 17:56:12 +0000 (13:56 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
include/linux/maple_tree.h
lib/maple_tree.c

index eb8f55d139b8f9de4d62f5f4dd1c7a81e3a6a3eb..0ac78e27b02fcec460a7c389e8205958007c277f 100644 (file)
@@ -163,6 +163,12 @@ enum store_type {
 };
 
 struct maple_copy {
+       /*
+        * min, max, and pivots are values
+        * start, end, split are indexes into arrays
+        * data is a size
+        */
+
        struct {
                struct maple_node *node;
                unsigned long max;
index 1720fbe5977eecb1d6f09ec2195cffeae3bacb00..28f053a062881129cf6750308d6c866ebd9b5aa4 100644 (file)
@@ -3113,7 +3113,7 @@ static inline void spanning_data_calc(struct maple_copy *cp,
 }
 
 static inline
-void rebalance_dest_setup(struct maple_copy *cp, struct ma_state *mas,
+void multi_dst_setup(struct maple_copy *cp, struct ma_state *mas,
                enum maple_type mt)
 {
        /* Data is 1 indexed, every src has +1 added.  */
@@ -3366,7 +3366,7 @@ static inline void rebalance_new_root(struct maple_copy *cp, struct ma_state *ma
 
                cp->data = cp->d_count;
                cp->s_count = 0;
-               rebalance_dest_setup(cp, mas, mt);
+               multi_dst_setup(cp, mas, mt);
                spanning_init_cp_src(cp);
                node_copy(mas, cp->src[0].node, 0, cp->data, cp->max, maple_copy,
                          cp->dst[0].node, 0, mt);
@@ -3438,7 +3438,7 @@ static void mas_wr_spanning_rebalance(struct ma_state *mas,
        do {
                spanning_data_calc(&cp, l_wr_mas, r_wr_mas, &sib);
                multi_src_setup(&cp, l_wr_mas, r_wr_mas, &sib);
-               rebalance_dest_setup(&cp, mas, l_wr_mas->type);
+               multi_dst_setup(&cp, mas, l_wr_mas->type);
                cp_data_write(&cp, mas);
        } while (spanning_ascend(&cp, mas, l_wr_mas, r_wr_mas, &sib));
 
@@ -4508,6 +4508,15 @@ static inline void mas_wr_append(struct ma_wr_state *wr_mas,
  */
 static noinline_for_kasan void mas_wr_split(struct ma_wr_state *wr_mas)
 {
+#if 1
+       struct maple_enode *old_enode;
+       struct ma_state *mas;
+       struct maple_copy cp;
+       struct ma_state sib;
+
+       trace_ma_write(__func__, wr_mas->mas, 0, wr_mas->entry);
+
+#else
        struct maple_big_node b_node;
 
        trace_ma_write(__func__, wr_mas->mas, 0, wr_mas->entry);
@@ -4515,6 +4524,7 @@ static noinline_for_kasan void mas_wr_split(struct ma_wr_state *wr_mas)
        mas_store_b_node(wr_mas, &b_node, wr_mas->offset_end);
        WARN_ON_ONCE(wr_mas->mas->store_type != wr_split_store);
        return mas_split(wr_mas->mas, &b_node);
+#endif
 }
 
 /*
@@ -4551,7 +4561,7 @@ static void mas_wr_rebalance(struct ma_wr_state *wr_mas)
        do {
                rebalance_data_calc(&cp, wr_mas, &sib);
                multi_src_setup(&cp, wr_mas, wr_mas, &sib);
-               rebalance_dest_setup(&cp, mas, wr_mas->type);
+               multi_dst_setup(&cp, mas, wr_mas->type);
                cp_data_write(&cp, mas);
        } while (rebalance_ascend(&cp, wr_mas, &sib));