Import 2.4.0-test2pre6
[davej-history.git] / include / linux / coda_opstats.h
blobfdf3fac42f2d6dfc0423e6fb208b9f37055d02fb
2 /*
3 * Operation statistics for Coda.
4 * Copyright (C) 1997 Carnegie Mellon University
5 *
6 * Carnegie Mellon University encourages users of this software
7 * to contribute improvements to the Coda project. Contact Peter Braam
8 * <coda@coda.cs.cmu.edu>.
9 */
13 #define CFS_MOUNT_STATS 0
14 #define CFS_UMOUNT_STATS 1
15 #define CFS_ROOT_STATS 2
16 #define CFS_STATFS_STATS 3
17 #define CFS_SYNC_STATS 4
18 #define CFS_VGET_STATS 5
19 #define CFS_VFSOPS_SIZE 6
21 /* vnodeops:
22 * open: all to venus
23 * close: all to venus
24 * rdrw: bogus. Maybe redirected to UFS.
25 * May call open/close for internal opens/closes
26 * (Does exec not call open?)
27 * ioctl: causes a lookupname
28 * passes through
29 * select: can't get there from here.
30 * getattr: can be satsified by cache
31 * setattr: all go through
32 * access: can be satisfied by cache
33 * readlink: can be satisfied by cache
34 * fsync: passes through
35 * inactive: passes through
36 * lookup: can be satisfied by cache
37 * create: passes through
38 * remove: passes through
39 * link: passes through
40 * rename: passes through
41 * mkdir: passes through
42 * rmdir: passes through
43 * symlink: passes through
44 * readdir: may be redirected to UFS
45 * may cause an "internal" open/close
48 #define CFS_OPEN_STATS 0
49 #define CFS_CLOSE_STATS 1
50 #define CFS_RDWR_STATS 2
51 #define CFS_IOCTL_STATS 3
52 #define CFS_SELECT_STATS 4
53 #define CFS_GETATTR_STATS 5
54 #define CFS_SETATTR_STATS 6
55 #define CFS_ACCESS_STATS 7
56 #define CFS_READLINK_STATS 8
57 #define CFS_FSYNC_STATS 9
58 #define CFS_INACTIVE_STATS 10
59 #define CFS_LOOKUP_STATS 11
60 #define CFS_CREATE_STATS 12
61 #define CFS_REMOVE_STATS 13
62 #define CFS_LINK_STATS 14
63 #define CFS_RENAME_STATS 15
64 #define CFS_MKDIR_STATS 16
65 #define CFS_RMDIR_STATS 17
66 #define CFS_SYMLINK_STATS 18
67 #define CFS_READDIR_STATS 19
68 #define CFS_VNODEOPS_SIZE 20
72 * I propose the following structres:
76 struct cfs_op_stats {
77 int opcode; /* vfs opcode */
78 long entries; /* number of times call attempted */
79 long sat_intrn; /* number of times call satisfied by cache */
80 long unsat_intrn; /* number of times call failed in cache, but
81 was not bounced to venus proper. */
82 long gen_intrn; /* number of times call generated internally */
83 /* (do we need that?) */
88 * With each call to the minicache, we'll bump the counters whenver
89 * a call is satisfied internally (through the cache or through a
90 * redirect), and whenever an operation is caused internally.
91 * Then, we can add the total operations caught by the minicache
92 * to the world-wide totals, and leave a caveat for the specific
93 * graphs later.