Re: [PATCH 3/4] lib/xarray: introduce a new helper xas_get_order

From: Matthew Wilcox
Date: Tue Mar 19 2024 - 12:52:22 EST


On Tue, Mar 19, 2024 at 05:27:32PM +0800, Kairui Song wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> It can be used after xas_load to check the order of loaded entries.
> Compared to xa_get_order, it saves an XA_STATE and avoid a rewalk.
>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>

Brilliant; yes. I was just looking at this the other day and wondering
why I hadn't done this.

Acked-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

> +EXPORT_SYMBOL(xas_get_order);

We don't have a module user yet, so I'd hold off on this. It's an
unusual thing to want to do, and we may never have a modular user.
Also, xas functions are EXPORT_SYMBOL_GPL, not EXPORT_SYMBOL.