Re: [PATCH v3 1/2] fs: use fake_file container for internal files with fake f_path

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

 



On Mon, Jun 12, 2023 at 11:28:23AM +0300, Amir Goldstein wrote:
> On Mon, Jun 12, 2023 at 11:07 AM Christian Brauner <brauner@xxxxxxxxxx> wrote:
> >
> > On Sun, Jun 11, 2023 at 09:45:45PM -0700, Christoph Hellwig wrote:
> > > On Sun, Jun 11, 2023 at 10:47:05PM +0300, Amir Goldstein wrote:
> > > > Overlayfs and cachefiles use open_with_fake_path() to allocate internal
> > > > files, where overlayfs also puts a "fake" path in f_path - a path which
> > > > is not on the same fs as f_inode.
> > >
> > > But cachefs doesn't, so this needs a better explanation / documentation.
> > >
> > > > Allocate a container struct file_fake for those internal files, that
> > > > is used to hold the fake path along with an optional real path.
> > >
> > > The idea looks sensible, but fake a is a really weird term here.
> > > I know open_with_fake_path also uses it, but we really need to
> > > come up with a better name, and also good documentation of the
> > > concept here.
> >
> > It's basically a stack so I'd either use struct file_stack or
> > struct file_proxy; with a preference for the latter.
> 
> Let the bikeshedding begin :)
> 
> file_proxy too generic to my taste
> 
> How about:
> 
> /* File is embedded in backing_file object */
> #define FMODE_BACKING           ((__force fmode_t)0x2000000)

Yeah, that'd be ok with me.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux