Import 2.3.99pre9-1
[davej-history.git] / include / linux / coda_cache.h
blobe549b02e7c94b6b08f4843b49ce283a7dbc41aba
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 /* credential cache */
25 void coda_cache_enter(struct inode *inode, int mask);
26 void coda_cache_clear_inode(struct inode *);
27 void coda_cache_clear_all(struct super_block *sb);
28 void coda_cache_clear_cred(struct super_block *sb, struct coda_cred *cred);
29 int coda_cache_check(struct inode *inode, int mask);
31 /* for downcalls and attributes and lookups */
32 void coda_flag_inode(struct inode *inode, int flag);
33 void coda_flag_inode_children(struct inode *inode, int flag);
37 * Structure to contain statistics on the cache usage
40 struct cfsnc_statistics {
41 unsigned hits;
42 unsigned misses;
43 unsigned enters;
44 unsigned dbl_enters;
45 unsigned long_name_enters;
46 unsigned long_name_lookups;
47 unsigned long_remove;
48 unsigned lru_rm;
49 unsigned zapPfids;
50 unsigned zapFids;
51 unsigned zapFile;
52 unsigned zapUsers;
53 unsigned Flushes;
54 unsigned Sum_bucket_len;
55 unsigned Sum2_bucket_len;
56 unsigned Max_bucket_len;
57 unsigned Num_zero_len;
58 unsigned Search_len;
62 #define CFSNC_FIND ((u_long) 1)
63 #define CFSNC_REMOVE ((u_long) 2)
64 #define CFSNC_INIT ((u_long) 3)
65 #define CFSNC_ENTER ((u_long) 4)
66 #define CFSNC_LOOKUP ((u_long) 5)
67 #define CFSNC_ZAPPFID ((u_long) 6)
68 #define CFSNC_ZAPFID ((u_long) 7)
69 #define CFSNC_ZAPVNODE ((u_long) 8)
70 #define CFSNC_ZAPFILE ((u_long) 9)
71 #define CFSNC_PURGEUSER ((u_long) 10)
72 #define CFSNC_FLUSH ((u_long) 11)
73 #define CFSNC_PRINTCFSNC ((u_long) 12)
74 #define CFSNC_PRINTSTATS ((u_long) 13)
75 #define CFSNC_REPLACE ((u_long) 14)
77 #endif _CFSNC_HEADER_