summaryrefslogtreecommitdiffstats
path: root/fs/fscache
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2021-10-21 00:19:46 +0100
committerDavid Howells <dhowells@redhat.com>2022-01-07 13:42:58 +0000
commit047487c947e8b96b94579c3a33207bd4e266b4c6 (patch)
tree848c6c23e7c683499820861cd6a523d9a49438fc /fs/fscache
parent7623ed6772de31cadcc474b87bcbc1db84cc1e8e (diff)
downloadlinux-stable-047487c947e8b96b94579c3a33207bd4e266b4c6.tar.gz
linux-stable-047487c947e8b96b94579c3a33207bd4e266b4c6.tar.bz2
linux-stable-047487c947e8b96b94579c3a33207bd4e266b4c6.zip
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
Diffstat (limited to 'fs/fscache')
0 files changed, 0 insertions, 0 deletions