Re: [PATCH 27/32] xfs: Add parent pointer ioctls

Christoph Hellwig
2024-04-17T05:29:21Z

On Tue, Apr 16, 2024 at 10:22:45PM -0700, Darrick J. Wong wrote:
> On Tue, Apr 16, 2024 at 12:14:24PM -0700, Christoph Hellwig wrote:
> > On Tue, Apr 16, 2024 at 12:07:33PM -0700, Darrick J. Wong wrote:
> > > Ohhhh, does that happens outside of XFS then? No wonder I couldn't find
> > > what you were talking about. Ok I'll go look some more.
> >
> > Yes. get_name() in fs/exportfs/expfs.c.
>
> Hmm. Implementing a custom ->get_name for pptrs would work well for
> child files with low hardlink counts. Certainly there are probably a
> lot more large directories than files that are hardlinked many many
> times. At what point does it become cheaper to scan the directory?

Note that despite my previous confusion get_name is also called for
directories to find the actual name they have in their parent.

An easy conservative choice would be to always look at the parent
pointers for nlink==1.

All of that is for later, I don't want to delay the parent pointers
series even further.