Re: [PATCH] lib/idr: fix ida_find_first_range() missing IDs across chunk boundaries

From: Matthew Wilcox

Date: Fri Mar 06 2026 - 15:16:11 EST


On Fri, Mar 06, 2026 at 08:03:19PM +0000, Josh Law wrote:
> ida_find_first_range() only examines the first XArray entry returned by
> xa_find(). If that entry does not contain a set bit at or above the
> requested offset, the function returns -ENOENT without searching
> subsequent entries, even though later chunks may contain allocated IDs
> within the requested range.

Can I trouble you to add a test to lib/test_ida.c to demonstrate the
problem (and that it's fixed, and that it doesn't come back)?

Also this needs a Fixes: line. I suggest 7fe6b987166b is the commit
it's fixing. Add Jason and Yi Liu as well as the author and committer
of that patch.