Messages in this thread | | | From | NeilBrown <> | Date | Thu, 29 Mar 2018 12:13:24 +1100 | Subject | Re: [PATCH 4/6] rhashtable: allow a walk of the hash table without missing objects. |
| |
On Thu, Mar 29 2018, NeilBrown wrote:
> > How about storing the hash chains in order by object address? > Then rhashtable_walk_start() can easily find it's place regardless of > whether the old object was still present or not, using <= on the > address. > "Insert" would need to record an insert location and insert there rather > than at the head of the chain. > I might try coding that.
Unfortunately rhltables make this approach unworkable. However while trying to write the code I found a bug :-( I'll post a patch for the bug, and a patch to transparently make the current interface more reliable when the caller keeps the current object in the table. I think this is sufficient for all current use-cases.
Thanks, NeilBrown [unhandled content-type:application/pgp-signature] | |