coda_proc.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * coda_statis.h
  3. *
  4. * CODA operation statistics
  5. *
  6. * (c) March, 1998
  7. * by Michihiro Kuramochi, Zhenyu Xia and Zhanyong Wan
  8. * zhanyong.wan@yale.edu
  9. *
  10. */
  11. #ifndef _CODA_PROC_H
  12. #define _CODA_PROC_H
  13. void coda_sysctl_init(void);
  14. void coda_sysctl_clean(void);
  15. #include <linux/sysctl.h>
  16. #include <linux/coda_fs_i.h>
  17. #include <linux/coda.h>
  18. /* these four files are presented to show the result of the statistics:
  19. *
  20. * /proc/fs/coda/vfs_stats
  21. * cache_inv_stats
  22. *
  23. * these four files are presented to reset the statistics to 0:
  24. *
  25. * /proc/sys/coda/vfs_stats
  26. * cache_inv_stats
  27. */
  28. /* VFS operation statistics */
  29. struct coda_vfs_stats
  30. {
  31. /* file operations */
  32. int open;
  33. int flush;
  34. int release;
  35. int fsync;
  36. /* dir operations */
  37. int readdir;
  38. /* inode operations */
  39. int create;
  40. int lookup;
  41. int link;
  42. int unlink;
  43. int symlink;
  44. int mkdir;
  45. int rmdir;
  46. int rename;
  47. int permission;
  48. /* symlink operatoins*/
  49. int follow_link;
  50. int readlink;
  51. };
  52. /* cache invalidation statistics */
  53. struct coda_cache_inv_stats
  54. {
  55. int flush;
  56. int purge_user;
  57. int zap_dir;
  58. int zap_file;
  59. int zap_vnode;
  60. int purge_fid;
  61. int replace;
  62. };
  63. /* these global variables hold the actual statistics data */
  64. extern struct coda_vfs_stats coda_vfs_stat;
  65. #endif /* _CODA_PROC_H */