Re: [PATCH 4/6] nfsd: filecache: introduce NFSD_FILE_RECENT

Chuck Lever
2025-02-13T00:09:11Z

On 2/12/25 5:39 PM, NeilBrown wrote:
> On Tue, 11 Feb 2025, Jeff Layton wrote:
>> One thing that Chuck has brought up a few times is that maybe we should
>> consider making v4 not use the filecache at all. If that simplifies
>> things then that might be a good thing to consider as well.
>
> As v4 stores the file with the open state it shouldn't need the cache.
> Maybe the filecache makes life a bit easier for localio?
>
> I don't know that it would make the garbage-collection/shrinking any
> simpler but it does superficially seem like an unnecessary indirection.
> Do you know of any specific benefit it brings v4?

One benefit is that the fs/nfsd/vfs.c APIs can all deal with nfsd_file's
no matter which NFS version is in use.

--
Chuck Lever