mbox series

[0/4] maple_tree: current split may result in deficient node

Message ID 20241020024628.22469-1-richard.weiyang@gmail.com (mailing list archive)
Headers show
Series maple_tree: current split may result in deficient node | expand

Message

Wei Yang Oct. 20, 2024, 2:46 a.m. UTC
Here are 4 patches related to correctly split node.

Patch 1: adjust the calculation of split
Patch 2: add a test case to check deficient split
Patch 3: the min value for mab_calc_split() seems not correct
Patch 4: during validation, we skip right most node on each level

Wei Yang (4):
  maple_tree: current split may result in deficient node
  maple_tree: add a test check deficient node
  maple_tree: use the correct min to calculate split
  maple_tree: only root node could be deficient

 lib/maple_tree.c      |  8 ++++----
 lib/test_maple_tree.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 4 deletions(-)

Comments

Liam R. Howlett Oct. 20, 2024, 8:34 p.m. UTC | #1
* Wei Yang <richard.weiyang@gmail.com> [241019 22:46]:
> Here are 4 patches related to correctly split node.

So I haven't worked through your last bunch of patches and I had not
fully responded to v3 before v4 came out.

These things take time to go through because you are changing fiddly
things that may break things or cause regressions, but you keep sending
a new series while another is in flight.

> 
> Patch 1: adjust the calculation of split

Split calculations exist with +/-1 to avoid jitter, but I will have to
look at this in minute detail.

If you screw this up, then we may lose data.

> Patch 2: add a test case to check deficient split
> Patch 3: the min value for mab_calc_split() seems not correct
> Patch 4: during validation, we skip right most node on each level
> 
> Wei Yang (4):
>   maple_tree: current split may result in deficient node
>   maple_tree: add a test check deficient node
>   maple_tree: use the correct min to calculate split
>   maple_tree: only root node could be deficient
> 
>  lib/maple_tree.c      |  8 ++++----
>  lib/test_maple_tree.c | 28 ++++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+), 4 deletions(-)
> 
> -- 
> 2.34.1
>
Wei Yang Oct. 21, 2024, 1:30 a.m. UTC | #2
On Sun, Oct 20, 2024 at 04:34:03PM -0400, Liam R. Howlett wrote:
>* Wei Yang <richard.weiyang@gmail.com> [241019 22:46]:
>> Here are 4 patches related to correctly split node.
>
>So I haven't worked through your last bunch of patches and I had not
>fully responded to v3 before v4 came out.
>

Sorry, I thought you have finished v3.

I will check with you in later work.

>These things take time to go through because you are changing fiddly
>things that may break things or cause regressions, but you keep sending
>a new series while another is in flight.
>

Thanks for you time on reviewing these. This really took efforts.

I will keep those in turn later. Is this what you preferred?

>> 
>> Patch 1: adjust the calculation of split
>
>Split calculations exist with +/-1 to avoid jitter, but I will have to
>look at this in minute detail.
>
>If you screw this up, then we may lose data.
>
>> Patch 2: add a test case to check deficient split
>> Patch 3: the min value for mab_calc_split() seems not correct
>> Patch 4: during validation, we skip right most node on each level
>> 
>> Wei Yang (4):
>>   maple_tree: current split may result in deficient node
>>   maple_tree: add a test check deficient node
>>   maple_tree: use the correct min to calculate split
>>   maple_tree: only root node could be deficient
>> 
>>  lib/maple_tree.c      |  8 ++++----
>>  lib/test_maple_tree.c | 28 ++++++++++++++++++++++++++++
>>  2 files changed, 32 insertions(+), 4 deletions(-)
>> 
>> -- 
>> 2.34.1
>>