Skip to content

Commit 14b9d09

Browse files
committed
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
1 parent b64a331 commit 14b9d09

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/cachefiles/cache.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ int cachefiles_add_cache(struct cachefiles_cache *cache)
4949
goto error_unsupported;
5050
}
5151

52-
/* check parameters */
52+
/* Check features of the backing filesystem:
53+
* - Directories must support looking up and directory creation
54+
* - We use xattrs to store metadata
55+
* - We need to be able to query the amount of space available
56+
* - We want to be able to sync the filesystem when stopping the cache
57+
* - We use DIO to/from pages, so the blocksize mustn't be too big.
58+
*/
5359
ret = -EOPNOTSUPP;
5460
if (d_is_negative(root) ||
5561
!d_backing_inode(root)->i_op->lookup ||

0 commit comments

Comments
 (0)