On Wed, Mar 07, 2001 at 10:11:56AM +1100, Neil Brown wrote:
> On Tuesday March 6, ak@xxxxxxx wrote:
> >
> > I think it would be best to fix nfsd to cache file handles instead of
> > dentries
> > and only do release when the nfsfh leaves the nfsfh cache.
> > This way could also help ext2, which caches readahead context in struct
> > file.
> >
> > Put Neil Brown into cc. Neil, do you see any obstacles with that?
> >
> >
> > -Andi
>
> Firstly, lets check that I understand the situation.
[...]
Main problem is that struct file is not preserved over RPCs. Various
file systems put state into struct file (ext2 readahead context, XFS
did discard preallocation in f_op->release, which is rather costly).
So I was looking for a way to preserve struct file across multiple RPCs.
[This is somewhat similar to another long standing NFS bug BTW --
it shares UDP sockets and there is excessive ARP traffic because the neighbour
state machine times out all the time and does ARP reprobes]
> You could ofcourse do all this inside knfsd, or even inside the
> individual filesystem, but it makes the code a lot more complex. You
> need to make sure you flush the cache in a timely fashion, and let go
> of denties that have been unlinked and all that stuff.
> If we get the dcache to do the delay, then it is easy as it already
> copes with those other things.
Storing a struct file in the dcache could unfortunately get a bit tricky -
it's not a 1:1 mapping and it would require new fields and new destructors.
I guess it would be easier to put a new cache inbetween similar to what 2.2
nfsd did.
-Andi
|