Import 2.1.89
[davej-history.git] / include / linux / coda_cache.h
blob44251867fb82ff7a774dbd295220602b0cde0c48
1 /* Coda filesystem -- Linux Minicache
3 * Copyright (C) 1989 - 1997 Carnegie Mellon University
5 * Carnegie Mellon University encourages users of this software to
6 * contribute improvements to the Coda project. Contact Peter Braam
7 * <coda@cs.cmu.edu>
8 */
10 #ifndef _CFSNC_HEADER_
11 #define _CFSNC_HEADER_
14 * Structure for an element in the Coda Credential Cache.
17 struct coda_cache {
18 struct list_head cc_cclist;/* list of all cache entries */
19 struct list_head cc_cnlist;/* list of cache entries/cnode */
20 int cc_mask;
21 struct coda_cred cc_cred;
24 voidcoda_ccinsert(struct coda_cache *el,struct super_block *sb);
25 voidcoda_cninsert(struct coda_cache *el,struct coda_inode_info *cnp);
26 voidcoda_ccremove(struct coda_cache *el);
27 voidcoda_cnremove(struct coda_cache *el);
28 voidcoda_cache_create(struct inode *inode,int mask);
29 struct coda_cache *coda_cache_find(struct inode *inode);
30 voidcoda_cache_enter(struct inode *inode,int mask);
31 voidcoda_cache_clear_cnp(struct coda_inode_info *cnp);
32 voidcoda_cache_clear_all(struct super_block *sb);
33 voidcoda_cache_clear_cred(struct super_block *sb,struct coda_cred *cred);
34 intcoda_cache_check(struct inode *inode,int mask);
35 voidcoda_dentry_delete(struct dentry *dentry);
36 voidcoda_zapfid(struct ViceFid *fid,struct super_block *sb,int flag);
40 * Structure to contain statistics on the cache usage
43 struct cfsnc_statistics {
44 unsigned hits;
45 unsigned misses;
46 unsigned enters;
47 unsigned dbl_enters;
48 unsigned long_name_enters;
49 unsigned long_name_lookups;
50 unsigned long_remove;
51 unsigned lru_rm;
52 unsigned zapPfids;
53 unsigned zapFids;
54 unsigned zapFile;
55 unsigned zapUsers;
56 unsigned Flushes;
57 unsigned Sum_bucket_len;
58 unsigned Sum2_bucket_len;
59 unsigned Max_bucket_len;
60 unsigned Num_zero_len;
61 unsigned Search_len;
65 #define CFSNC_FIND ((u_long) 1)
66 #define CFSNC_REMOVE ((u_long) 2)
67 #define CFSNC_INIT ((u_long) 3)
68 #define CFSNC_ENTER ((u_long) 4)
69 #define CFSNC_LOOKUP ((u_long) 5)
70 #define CFSNC_ZAPPFID ((u_long) 6)
71 #define CFSNC_ZAPFID ((u_long) 7)
72 #define CFSNC_ZAPVNODE ((u_long) 8)
73 #define CFSNC_ZAPFILE ((u_long) 9)
74 #define CFSNC_PURGEUSER ((u_long) 10)
75 #define CFSNC_FLUSH ((u_long) 11)
76 #define CFSNC_PRINTCFSNC ((u_long) 12)
77 #define CFSNC_PRINTSTATS ((u_long) 13)
78 #define CFSNC_REPLACE ((u_long) 14)
80 #endif _CFSNC_HEADER_
close