]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
fscache: Implement functions add/remove a cache
authorDavid Howells <dhowells@redhat.com>
Wed, 20 Oct 2021 14:00:26 +0000 (15:00 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 14:28:52 +0000 (14:28 +0000)
commit8604445e3b66c55589e7d473a5379ab54ab440d3
treee6e381f9c9e21e49df9dfcd0430cd7e695899d09
parentd35842059c77fb85ba2cd09d626d60166764db25
fscache: Implement functions add/remove a cache

Implement functions to allow the cache backend to add or remove a cache:

 (1) Declare a cache to be live:

int fscache_add_cache(struct fscache_cache *cache,
      const struct fscache_cache_ops *ops,
      void *cache_priv);

     Take a previously acquired cache cookie, set the operations table and
     private data and mark the cache open for access.

 (2) Withdraw a cache from service:

void fscache_withdraw_cache(struct fscache_cache *cache);

     This marks the cache as withdrawn and thus prevents further
     cache-level and volume-level accesses.

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