]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
fscache: Implement simple cookie state machine
authorDavid Howells <dhowells@redhat.com>
Wed, 20 Oct 2021 14:53:34 +0000 (15:53 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 14:28:52 +0000 (14:28 +0000)
commit1642e1fb0939d83232bf93818162223010c6a861
tree86f60eb31f5feb139fc33b12515b9c6f51ac7698
parenta0092a814753d50930c8f7b071ea08c20eb92771
fscache: Implement simple cookie state machine

Implement a very simple cookie state machine to handle lookup, withdrawal,
relinquishment and, eventually, timed committing and invalidation.

Three cache methods are provided: ->lookup_cookie() to look up and, if
necessary, create a data storage object; ->withdraw_cookie() to free the
resources associated with that object and potentially delete it; and
->prepare_to_write(), to do prepare for changes to the cached data to be
modified locally.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cachefs@redhat.com
fs/fscache/cookie.c
include/linux/fscache-cache.h
include/linux/fscache.h
include/trace/events/fscache.h