From: Matthew Wilcox <willy@infradead.org>
To: Boaz Harrosh <boaz@plexistor.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Unexpected behavior from xarray - Is it expected?
Date: Tue, 14 Jul 2020 14:46:27 +0100 [thread overview]
Message-ID: <20200714134627.GC12769@casper.infradead.org> (raw)
In-Reply-To: <9c7b1024-d81e-6038-7e01-6747c897d79e@plexistor.com>
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?
next prev parent reply other threads:[~2020-07-14 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 11:24 Unexpected behavior from xarray - Is it expected? Boaz Harrosh
2020-07-14 13:17 ` Boaz Harrosh
2020-07-14 13:46 ` Matthew Wilcox [this message]
2020-07-14 17:54 ` Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200714134627.GC12769@casper.infradead.org \
--to=willy@infradead.org \
--cc=boaz@plexistor.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).