Skip to content

Commit

Permalink
cachefiles: Explain checks in a comment
Browse files Browse the repository at this point in the history
Add a comment to explain the checks that cachefiles is making of the
backing filesystem[1].

Suggested-by: Jeff Layton <[email protected]>
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]/ [1]
Link: https://lore.kernel.org/r/164251405621.3435901.771439791811515914.stgit@warthog.procyon.org.uk/ # v1
  • Loading branch information
dhowells committed Jan 21, 2022
1 parent b64a331 commit 14b9d09
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fs/cachefiles/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 14b9d09

Please sign in to comment.