coda_fs_i.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * coda_fs_i.h
  3. *
  4. * Copyright (C) 1998 Carnegie Mellon University
  5. *
  6. */
  7. #ifndef _LINUX_CODA_FS_I
  8. #define _LINUX_CODA_FS_I
  9. #ifdef __KERNEL__
  10. #include <linux/types.h>
  11. #include <linux/list.h>
  12. #include <linux/coda.h>
  13. /*
  14. * coda fs inode data
  15. */
  16. struct coda_inode_info {
  17. struct CodaFid c_fid; /* Coda identifier */
  18. u_short c_flags; /* flags (see below) */
  19. struct list_head c_cilist; /* list of all coda inodes */
  20. unsigned int c_mapcount; /* nr of times this inode is mapped */
  21. unsigned int c_cached_epoch; /* epoch for cached permissions */
  22. vuid_t c_uid; /* fsuid for cached permissions */
  23. unsigned int c_cached_perm; /* cached access permissions */
  24. struct inode vfs_inode;
  25. };
  26. /*
  27. * coda fs file private data
  28. */
  29. #define CODA_MAGIC 0xC0DAC0DA
  30. struct coda_file_info {
  31. int cfi_magic; /* magic number */
  32. struct file *cfi_container; /* container file for this cnode */
  33. unsigned int cfi_mapcount; /* nr of times this file is mapped */
  34. };
  35. #define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data))
  36. /* flags */
  37. #define C_VATTR 0x1 /* Validity of vattr in inode */
  38. #define C_FLUSH 0x2 /* used after a flush */
  39. #define C_DYING 0x4 /* from venus (which died) */
  40. #define C_PURGE 0x8
  41. int coda_cnode_make(struct inode **, struct CodaFid *, struct super_block *);
  42. struct inode *coda_iget(struct super_block *sb, struct CodaFid *fid, struct coda_vattr *attr);
  43. int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
  44. struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
  45. void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
  46. #endif
  47. #endif