On Tue, Jul 14, 2020 at 02:24:18PM +0300, Boaz Harrosh wrote: > Matthew Hi > > First I want to thank you for the great xarray tool. I use it heavily with great joy & ease > > However I have encountered a bug in my code which I did not expect, as follows: > > I need code in the very hot-path that is looping on the xarray in an unusual way. > What I need is to scan a range from x-x+l but I need to break on first "hole" ie. > first entry that was not __xa_store() to. So I am using this loop: > rcu_read_lock(); > > for (xae = xas_load(&xas); xae; xae = xas_next(&xas)) { > ... > } > > Every thing works fine and I usually get a NULL from xas_next() (or xas_load()) > on first hole, And the loop exits. > > But in the case that I have entered a *single* xa_store() *at index 0*, but then try > to GET a range 0-Y I get these unexpected results: > xas_next() will return the same entry repeatedly I thought this was fixed in commit 91abab83839aa2eba073e4a63c729832fdb27ea1 Do you have that commit in your tree?