]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
cachefiles: Explain checks in a comment
authorDavid Howells <dhowells@redhat.com>
Fri, 7 Jan 2022 10:51:13 +0000 (10:51 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 21 Jan 2022 21:36:28 +0000 (21:36 +0000)
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/
Link: https://lore.kernel.org/r/164251405621.3435901.771439791811515914.stgit@warthog.procyon.org.uk/
fs/cachefiles/cache.c

index 1e9c71666c6ab72ad01b849b5730563adedc804c..2b2879c5d1d28914dd7ac960cadbe05d1444f675 100644 (file)
@@ -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 ||