On Tue, Apr 16, 2024 at 11:52:09AM -0700, Darrick J. Wong wrote: > > > <nod> But does exportfs actually want parent info for a nondirectory? > > > There aren't any stubs or XXX/FIXME comments, and I've never heard any > > > calls (at least on fsdevel) for that functionality. > > > > It doesn't. It would avoid having disconnected dentries, but > > disconnected non-directory dentries aren't really a problem. > > For directories, I think the dotdot lookup is much cheaper than scanning > the attrs to find the first nongarbage XFS_ATTR_PARENT entry. It is. But I was confused again, it's been a while since I worked on that code.. We do the full reconnection for non-directories if NFSD asks for it (the XFS or VFS handle code won't hit this because our acceptable callback always returns true). That code does a readdir on the parent and returns the name when it finds the inode number. For files without crazy number of hardlinks just looking over the parent pointers would be a lot more efficient for that.