Re: [PATCH 1/2] maple_tree: check for MA_STATE_BULK on setting wr_rebalance

From: Wei Yang
Date: Fri Oct 11 2024 - 23:31:33 EST


On Fri, Oct 11, 2024 at 05:44:50PM -0400, Sidhartha Kumar wrote:
>It is possible for a bulk operation (MA_STATE_BULK is set) to enter the
>new_end < mt_min_slots[type] case and set wr_rebalance as a store type.
>This is incorrect as bulk stores do not rebalance per write, but rather
>after the all of the writes are done through the mas_bulk_rebalance()
>path. Therefore, add a check to make sure MA_STATE_BULK is not set
>before we return wr_rebalance as the store type.
>
>Also add a test to make sure wr_rebalance is never the store type when
>doing bulk operations via mas_expected_entries()
>
>Fixes: 5d659bbb52a2 ("maple_tree: introduce mas_wr_store_type()")
>Suggested-by: Liam Howlett <liam.howlett@xxxxxxxxxx>
>Signed-off-by: Sidhartha <sidhartha.kumar@xxxxxxxxxx>

Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxx>

--
Wei Yang
Help you, Help me