summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-01-07 10:51:13 +0000
committerDavid Howells <dhowells@redhat.com>2022-01-21 21:36:28 +0000
commit14b9d0902dfa25dac9c41bf346aa655fdeafe5b2 (patch)
tree7f7d282b76af3da8c6e8cb7d68afddb2ac8a1441 /fs/cachefiles
parentb64a3314989df8e44c114f377808407f36dbf4f4 (diff)
downloadlinux-14b9d0902dfa25dac9c41bf346aa655fdeafe5b2.tar.bz2
cachefiles: Explain checks in a comment
Add a comment to explain the checks that cachefiles is making of the backing filesystem[1]. Suggested-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/568749bd7cc02908ecf6f3d6a611b6f9cf5c4afd.camel@kernel.org/ [1] Link: https://lore.kernel.org/r/164251405621.3435901.771439791811515914.stgit@warthog.procyon.org.uk/ # v1
Diffstat (limited to 'fs/cachefiles')
-rw-r--r--fs/cachefiles/cache.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cachefiles/cache.c b/fs/cachefiles/cache.c
index 1e9c71666c6a..2b2879c5d1d2 100644
--- a/fs/cachefiles/cache.c
+++ b/fs/cachefiles/cache.c
@@ -49,7 +49,13 @@ int cachefiles_add_cache(struct cachefiles_cache *cache)
goto error_unsupported;
}
- /* check parameters */
+ /* Check features of the backing filesystem:
+ * - Directories must support looking up and directory creation
+ * - We use xattrs to store metadata
+ * - We need to be able to query the amount of space available
+ * - We want to be able to sync the filesystem when stopping the cache
+ * - We use DIO to/from pages, so the blocksize mustn't be too big.
+ */
ret = -EOPNOTSUPP;
if (d_is_negative(root) ||
!d_backing_inode(root)->i_op->lookup ||