diff options
author | David Howells <dhowells@redhat.com> | 2009-04-03 11:42:42 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-04-03 11:42:42 -0400 |
commit | 147272813e043fb44bd112527951da70c1e663de (patch) | |
tree | 4b67df2bb809c7b661e7c6f4b1692ab8af41a996 /fs/nfs/fscache.h | |
parent | 8ec442ae4c6577ed181682e534d4eef524e30b3c (diff) |
NFS: Define and create server-level objects
Define and create server-level cache index objects (as managed by nfs_client
structs).
Each server object is created in the NFS top-level index object and is itself
an index into which superblock-level objects are inserted.
Ideally there would be one superblock-level object per server, and the former
would be folded into the latter; however, since the "nosharecache" option
exists this isn't possible.
The server object key is a sequence consisting of:
(1) NFS version
(2) Server address family (eg: AF_INET or AF_INET6)
(3) Server port.
(4) Server IP address.
The key blob is of variable length, depending on the length of (4).
The server object is given no coherency data to carry in the auxiliary data
permitted by the cache.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Steve Dickson <steved@redhat.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
Diffstat (limited to 'fs/nfs/fscache.h')
-rw-r--r-- | fs/nfs/fscache.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h index ccfcdc58066e..1d864bedf154 100644 --- a/fs/nfs/fscache.h +++ b/fs/nfs/fscache.h | |||
@@ -23,13 +23,23 @@ | |||
23 | * fscache-index.c | 23 | * fscache-index.c |
24 | */ | 24 | */ |
25 | extern struct fscache_netfs nfs_fscache_netfs; | 25 | extern struct fscache_netfs nfs_fscache_netfs; |
26 | extern const struct fscache_cookie_def nfs_fscache_server_index_def; | ||
26 | 27 | ||
27 | extern int nfs_fscache_register(void); | 28 | extern int nfs_fscache_register(void); |
28 | extern void nfs_fscache_unregister(void); | 29 | extern void nfs_fscache_unregister(void); |
29 | 30 | ||
31 | /* | ||
32 | * fscache.c | ||
33 | */ | ||
34 | extern void nfs_fscache_get_client_cookie(struct nfs_client *); | ||
35 | extern void nfs_fscache_release_client_cookie(struct nfs_client *); | ||
36 | |||
30 | #else /* CONFIG_NFS_FSCACHE */ | 37 | #else /* CONFIG_NFS_FSCACHE */ |
31 | static inline int nfs_fscache_register(void) { return 0; } | 38 | static inline int nfs_fscache_register(void) { return 0; } |
32 | static inline void nfs_fscache_unregister(void) {} | 39 | static inline void nfs_fscache_unregister(void) {} |
33 | 40 | ||
41 | static inline void nfs_fscache_get_client_cookie(struct nfs_client *clp) {} | ||
42 | static inline void nfs_fscache_release_client_cookie(struct nfs_client *clp) {} | ||
43 | |||
34 | #endif /* CONFIG_NFS_FSCACHE */ | 44 | #endif /* CONFIG_NFS_FSCACHE */ |
35 | #endif /* _NFS_FSCACHE_H */ | 45 | #endif /* _NFS_FSCACHE_H */ |