Re: [PATCH 3/6] cachefiles: Use lookup_one() rather than lookup_one_len()

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

 



On Thu, Mar 20, 2025 at 01:49:25PM +0000, David Howells wrote:
> Christian Brauner <brauner@xxxxxxxxxx> wrote:
> 
> > > > It also uses the lookup_one_len() family of functions which implicitly
> > > > use &nop_mnt_idmap.  This mixture of implicit and explicit could be
> > > > confusing.  When we eventually update cachefiles to support idmap mounts
> > > > it
> > > 
> > > Is that something we ever plan to do?
> > 
> > It should be pretty easy to do. I just didn't see a reason to do it yet.
> > 
> > Fwiw, the cache paths that cachefiles uses aren't private mounts like
> > overlayfs does it, i.e., cachefiles doesn't do clone_private_mount() before
> > stashing cache->mnt. ...
> 
> This is probably something cachefilesd needs to do in userspace before telling
> the kernel through /dev/cachefiles where to find the cache.

Afaict, I don't think it matters whether the mount is actually attached
to a mount namespace so cachefilesd could just do:

fd_tree = open_tree(AT_FDCWD, "/path/to/cache", AT_EMPTY_PATH | OPEN_TREE_CLONE);

and use the detached mount for all cachefilesd interactions.




[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