Re: [PATCH v4 06/11] rust: xarray: add `find_next` and `find_next_mut`

From: Tamir Duberstein

Date: Fri Jun 05 2026 - 11:22:28 EST


On Thu, 04 Jun 2026 21:58:12 +0200, Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
> Add methods to find the next element in an XArray starting from a
> given index. The methods return a tuple containing the index where the
> element was found and a reference to the element.
>
> The implementation uses the XArray state API via `xas_find` to avoid taking
> the rcu lock as an exclusive lock is already held by `Guard`.

The previous patch re-hosts existing XArray methods on XArrayState, but
this patch and subsequent ones are choosing to grow the XArray API
rather than promote XArrayState to a proper abstraction that users
should prefer. Are you sure that's the right choice?

--
Tamir Duberstein <tamird@xxxxxxxxxx>