linux-stable/fs/cachefiles
David Howells 72b957856b cachefiles: Implement metadata/coherency data storage in xattrs
Use an xattr on each backing file in the cache to store some metadata, such
as the content type and the coherency data.

Five content types are defined:

 (0) No content stored.

 (1) The file contains a single monolithic blob and must be all or nothing.
     This would be used for something like an AFS directory or a symlink.

 (2) The file is populated with content completely up to a point with
     nothing beyond that.

 (3) The file has a map attached and is sparsely populated.  This would be
     stored in one or more additional xattrs.

 (4) The file is dirty, being in the process of local modification and the
     contents are not necessarily represented correctly by the metadata.
     The file should be deleted if this is seen on binding.

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/163819641320.215744.16346770087799536862.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163906942248.143852.5423738045012094252.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163967151734.1823006.9301249989443622576.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/164021550471.640689.553853918307994335.stgit@warthog.procyon.org.uk/ # v4
2022-01-07 13:42:24 +00:00
..
cache.c cachefiles: Implement volume support 2022-01-07 13:41:53 +00:00
daemon.c cachefiles: Implement volume support 2022-01-07 13:41:53 +00:00
error_inject.c cachefiles: Add some error injection support 2022-01-07 13:40:56 +00:00
interface.c cachefiles: Implement object lifecycle funcs 2022-01-07 13:42:08 +00:00
internal.h cachefiles: Implement metadata/coherency data storage in xattrs 2022-01-07 13:42:24 +00:00
Kconfig cachefiles: Add some error injection support 2022-01-07 13:40:56 +00:00
key.c cachefiles: Implement key to filename encoding 2022-01-07 13:42:16 +00:00
main.c cachefiles: Implement object lifecycle funcs 2022-01-07 13:42:08 +00:00
Makefile cachefiles: Implement metadata/coherency data storage in xattrs 2022-01-07 13:42:24 +00:00
namei.c cachefiles: Implement a function to get/create a directory in the cache 2022-01-07 13:41:40 +00:00
security.c cachefiles: Add security derivation 2022-01-07 13:41:14 +00:00
volume.c cachefiles: Implement volume support 2022-01-07 13:41:53 +00:00
xattr.c cachefiles: Implement metadata/coherency data storage in xattrs 2022-01-07 13:42:24 +00:00