From a6891645cf2ddd4778096848a864580e7258faba Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 3 Apr 2009 16:42:37 +0100 Subject: FS-Cache: Root index definition Add a description of the root index of the cache for later patches to make use of. The root index is owned by FS-Cache itself. When a netfs requests caching facilities, FS-Cache will, if one doesn't already exist, create an entry in the root index with the key being the name of the netfs ("AFS" for example), and the auxiliary data holding the index structure version supplied by the netfs: FSDEF | +-----------+ | | NFS AFS [v=1] [v=1] If an entry with the appropriate name does already exist, the version is compared. If the version is different, the entire subtree from that entry will be discarded and a new entry created. The new entry will be an index, and a cookie referring to it will be passed to the netfs. This is then the root handle by which the netfs accesses the cache. It can create whatever objects it likes in that index, including further indices. Signed-off-by: David Howells Acked-by: Steve Dickson Acked-by: Trond Myklebust Acked-by: Al Viro Tested-by: Daire Byrne --- fs/fscache/internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/fscache/internal.h') diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index 16f9f1f46e4d..4113af8d1660 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h @@ -27,6 +27,12 @@ #define FSCACHE_MIN_THREADS 4 #define FSCACHE_MAX_THREADS 32 +/* + * fsc-fsdef.c + */ +extern struct fscache_cookie fscache_fsdef_index; +extern struct fscache_cookie_def fscache_fsdef_netfs_def; + /* * fsc-histogram.c */ -- cgit v1.2.3