From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Xu Subject: Re: [PATCH 2/3] rhashtable: Add rhashtable_walk_curr Date: Tue, 19 Dec 2017 10:38:40 +1100 Message-ID: <20171218233840.GA25632@gondor.apana.org.au> References: <20171218133122.29179-1-agruenba@redhat.com> <20171218133122.29179-2-agruenba@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: cluster-devel@redhat.com, Thomas Graf , netdev@vger.kernel.org To: Andreas Gruenbacher Return-path: Received: from [128.1.224.119] ([128.1.224.119]:44968 "EHLO ringil.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1759835AbdLRXit (ORCPT ); Mon, 18 Dec 2017 18:38:49 -0500 Content-Disposition: inline In-Reply-To: <20171218133122.29179-2-agruenba@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Dec 18, 2017 at 02:31:21PM +0100, Andreas Gruenbacher wrote: > When iterating through an rhashtable is stopped with > rhashtable_walk_stop and then resumed with rhashtable_walk_start, there > currently is no way to get back to the current object and thus revisit > the object rhashtable_walk_next has previously returned. > > This functionality is useful when dumping an rhashtable via the seq file > interface: seq_read will convert one object after the other. When an > object doesn't fit in the remaining buffer space anymore, user-space > will be returned all objects that have been fully converted so far. > Upon the next read from user-space, the object that didn't fit > previously will be revisited. > > Signed-off-by: Andreas Gruenbacher Doesn't the helper that Tom Herbert just added do exactly this? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt