[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180403040322.GB3515@gondor.apana.org.au>
Date: Tue, 3 Apr 2018 12:03:23 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: NeilBrown <neilb@...e.com>
Cc: Andreas Gruenbacher <agruenba@...hat.com>,
cluster-devel <cluster-devel@...hat.com>, netdev@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, Thomas Graf <tgraf@...g.ch>,
Tom Herbert <tom@...ntonium.net>
Subject: Re: [PATCH v2 0/2] gfs2: Stop using rhashtable_walk_peek
On Tue, Apr 03, 2018 at 01:41:26PM +1000, NeilBrown wrote:
>
> Do we really need a rhashtable_walk_peek() interface?
> I imagine that a seqfile ->start function can do:
>
> if (*ppos == 0 && last_pos != 0) {
> rhashtable_walk_exit(&iter);
> rhashtable_walk_enter(&table, &iter);
> last_pos = 0;
> }
> rhashtable_walk_start(&iter);
> if (*ppos == last_pos && iter.p)
> return iter.p;
> last_pos = *ppos;
We don't want users poking into the internals of iter. If you're
suggesting we could simplify rhashtable_walk_peek to just this after
your patch then yes possibly. You also need to ensure that not only
seqfs users continue to work but also netlink dump users which are
slightly different.
> It might be OK to have a function call instead of expecting people to
> use iter.p directly.
Yes that would definitely be the preferred option.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists