linux/fs/cachefiles
David Howells 047487c947 cachefiles: Implement the I/O routines
Implement the I/O routines for cachefiles.  There are two sets of routines
here: preparation and actual I/O.

Preparation for read involves looking to see whether there is data present,
and how much.  Netfslib tells us what it wants us to do and we have the
option of adjusting shrinking and telling it whether to read from the
cache, download from the server or simply clear a region.

Preparation for write involves checking for space and defending against
possibly running short of space, if necessary punching out a hole in the
file so that we don't leave old data in the cache if we update the
coherency information.

Then there's a read routine and a write routine.  They wait for the cookie
state to move to something appropriate and then start a potentially
asynchronous direct I/O operation upon it.

Changes
=======
ver #2:
 - Fix a misassigned variable[1].

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/YaZOCk9zxApPattb@archlinux-ax161/ [1]
Link: https://lore.kernel.org/r/163819647945.215744.17827962047487125939.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163906954666.143852.1504887120569779407.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163967163110.1823006.9206718511874339672.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/164021562168.640689.8802250542405732391.stgit@warthog.procyon.org.uk/ # v4
2022-01-07 13:42:58 +00:00
..
cache.c cachefiles: Implement backing file wrangling 2022-01-07 13:42:40 +00:00
daemon.c cachefiles: Implement backing file wrangling 2022-01-07 13:42:40 +00:00
error_inject.c cachefiles: Add some error injection support 2022-01-07 13:40:56 +00:00
interface.c cachefiles: Implement cookie resize for truncate 2022-01-07 13:42:50 +00:00
internal.h cachefiles: Implement begin and end I/O operation 2022-01-07 13:42:44 +00:00
io.c cachefiles: Implement the I/O routines 2022-01-07 13:42:58 +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 begin and end I/O operation 2022-01-07 13:42:44 +00:00
namei.c cachefiles: Implement backing file wrangling 2022-01-07 13:42: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