Re: [PATCH v2 2/3] fs: introduce f_real_path() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 12, 2023 at 09:28:40AM +0300, Amir Goldstein wrote:
> On Mon, Jun 12, 2023 at 7:36 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> >
> > On Sun, Jun 11, 2023 at 04:27:31PM +0300, Amir Goldstein wrote:
> > > Overlayfs knows the real path of underlying dentries.  Add an optional
> > > struct vfsmount out argument to ->d_real(), so callers could compose the
> > > real path.
> > >
> > > Add a helper f_real_path() that uses this new interface to return the
> > > real path of f_inode, for overlayfs internal files whose f_path if a
> > > "fake" overlayfs path and f_inode is the underlying real inode.
> >
> > I really don't like this ->d_real nagic.  Most callers of it
> > really can't ever be on overlayfs.
> 
> Which callers are you referring to?

Most users of file_dentry are inside file systems and will never
see the overlayfs path.

> > So I'd suggest we do an audit
> > of the callers of file_dentry and drop all the pointless ones
> > first, and improve the documentation on when to use it.
> 
> Well, v3 is trying to reduce ->d_real() magic and the step
> after introducing the alternative path container is to convert
> file_dentry() to use the stored real_path instead of ->d_real().

Yeah, that makes this comment kinda irrelevant.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux