2019年9月16日(月) 3:43 Jason Thorpe <thor...@me.com>: > > > > On Sep 15, 2019, at 11:03 AM, Christos Zoulas <chris...@zoulas.com> > wrote: > > > > I think it is quite reliable because all the file descriptors would be > recently > > opened and therefore be in the cache. One would need to DoS the cache > > cause eviction. If that turns out to be false, we can make the namecache > > reliable, or withdraw it. > > If we had a way to ask the file system for the / a name+parent in the > event we don't find an entry in the name cache, then we don't have to make > the name cache "reliable". >
but it would be a super expensive operation for the majority of filesystems, right? > > FWIW, I don't think making the name cache "reliable" is necessarily a good > idea -- it could be abused to consume kernel memory by creating lots of > long-named files / directories. > > In the event that the name really can't be determined (perhaps it's an > open-unlinked file?), then I think it's perfectly reasonable to return > ENOENT for F_GETPATH; callers need to be capable of handling that. > > -- thorpej > >