xa_find_after(9)
π xa_find_after β like, the whole vibe π
okay so bestie, welcome to the Kernel API Manual page for xa_find_after(9) β yes it's a section 9 manpage, yes it's about XArrays, and yes you're gonna slay this. π¦
β¨ NAME β¨
xa_find_after β Search the XArray for a present entry. That's it, that's the whole job. π
π SYNOPSIS π
void * xa_find_after (struct xarray *xa , unsigned long *indexp ,
unsigned long max , xa_mark_t filter );
no cap, that's the whole signature. copy it exactly, don't be cute with it. π
πΈ ARGUMENTS πΈ
xaβ the XArray. the main character. everything happens in here. πindexpβ a pointer to an index. like, a pointer pointer. it gets updated, so pay attention. β¨maxβ the maximum index to search to. that's your ceiling, do not exceed. πfilterβ the selection criterion. it's giving "what are we even looking for" energy. π―
π DESCRIPTION π
so what it does: it finds the entry in xa which matches the filter and has the lowest index that is above indexp and no more than max. lowkey a whole little search algorithm, highkey iconic. π₯
and when it finds one? indexp gets updated to be the index of that entry. slay. so your pointer walks forward with you. π«Ά
β οΈ okay important caveat, don't skip this: this function is protected by the RCU read lock, so it may miss entries which are being simultaneously added. so like, it's fast, but it can ghost you mid-scan. not its fault. π
also β and this matters β it will not return an XA_RETRY_ENTRY. if you need to see retry entries, use xas_find. periodt. π
β CONTEXT β
Any context. literally any. it takes and releases the RCU lock, so it's polite like that. π§
π RETURN π
The pointer, if found, otherwise NULL. that's the whole deal. found = pointer, not found = NULL, no in-between, no dramatic reveal. π
π SEE ALSO π
Kernel file ./lib/xarray.c β and honestly the whole friend group, go say hi:
xas_load(9), xas_nomem(9), xas_free_nodes(9), xas_create_range(9), xas_store(9), xas_get_mark(9), xas_set_mark(9), xas_clear_mark(9), xas_init_marks(9), xas_split_alloc(9), xas_split(9), xas_try_split_min_order(9), xas_try_split(9), xas_pause(9), xas_find(9), xas_find_marked(9), xas_find_conflict(9), xa_load(9), __xa_erase(9), xa_erase(9), __xa_store(9), xa_store(9), __xa_cmpxchg(9), __xa_insert(9), xa_store_range(9), xas_get_order(9), xa_get_order(9), __xa_alloc(9), __xa_alloc_cyclic(9), __xa_set_mark(9), __xa_clear_mark(9), xa_get_mark(9), xa_set_mark(9), xa_clear_mark(9), xa_find(9), xa_extract(9), xa_delete_node(9), xa_destroy(9)
and that's the page!! π
β¨ this little gem lives in ./lib and it's dated October 2026 β so yeah, mark your calendar bestie, go read xa_find_after(9) and thrive. ππ¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms