cachefiles: do not yet allow on idmapped mounts
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 24 Mar 2021 08:51:10 +0000 (08:51 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Mar 2021 17:20:22 +0000 (10:20 -0700)
commitbf1c82a5389061d989f5e07f1c958db4efaf2141
tree0b4974b7744bad2ac11bcff33a979ea5c07a736a
parent7acac4b3196caee5e21fb5ea53f8bc124e6a16fc
cachefiles: do not yet allow on idmapped mounts

Based on discussions (e.g. in [1]) my understanding of cachefiles and
the cachefiles userspace daemon is that it creates a cache on a local
filesystem (e.g. ext4, xfs etc.) for a network filesystem. The way this
is done is by writing "bind" to /dev/cachefiles and pointing it to the
directory to use as the cache.

Currently this directory can technically also be an idmapped mount but
cachefiles aren't yet fully aware of such mounts and thus don't take the
idmapping into account when creating cache entries. This could leave
users confused as the ownership of the files wouldn't match to what they
expressed in the idmapping. Block cache files on idmapped mounts until
the fscache rework is done and we have ported it to support idmapped
mounts.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/lkml/20210303161528.n3jzg66ou2wa43qb@wittgenstein
Link: https://lore.kernel.org/r/20210316112257.2974212-1-christian.brauner@ubuntu.com/
Link: https://listman.redhat.com/archives/linux-cachefs/2021-March/msg00044.html
Link: https://lore.kernel.org/r/20210319114146.410329-1-christian.brauner@ubuntu.com/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/cachefiles/bind.c