Re: [f2fs-dev] [PATCH 11/11] fsverity: use a hashtable to find the fsverity_info

Christoph Hellwig
2026-01-23T07:30:42Z

On Thu, Jan 22, 2026 at 11:27:00PM -0800, Darrick J. Wong wrote:
> > rhashtable_lookup_fast returns the struct containing the rhash_head.
> > The paramters store the rhead_offset for that purpose. See rht_obj
> > as used by rhashtable_lookup.
>
> Ahah. That's right, but (imo) a weird quirk of the rhashtable
> interface. Though I only say that because *I* keep tripping over that;
> maybe everyone else is ok.

I don't think it's a quirk. It seems like an explicit design decision.
Not one I would have taken as I think doing a container_of in the caller
would be cleaner, but it is what it is.