coda_fs_i.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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 ViceFid     c_fid; /* Coda identifier */
  18.         u_short            c_flags;     /* flags (see below) */
  19. struct list_head   c_cilist;    /* list of all coda inodes */
  20. int    c_mapcount; /* how often is this inode mmapped */
  21.         struct coda_cred   c_cached_cred; /* credentials of cached perms */
  22.         unsigned int       c_cached_perm; /* cached access permissions */
  23. };
  24. /*
  25.  * coda fs file private data
  26.  */
  27. #define CODA_MAGIC 0xC0DAC0DA
  28. struct coda_file_info {
  29. int  cfi_magic; /* magic number */
  30. int  cfi_mapcount;  /* how often this file is mapped */
  31. struct file *cfi_container; /* container file for this cnode */
  32. struct coda_cred cfi_cred; /* credentials of opener */
  33. };
  34. #define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data))
  35. /* flags */
  36. #define C_VATTR       0x1   /* Validity of vattr in inode */
  37. #define C_FLUSH       0x2   /* used after a flush */
  38. #define C_DYING       0x4   /* from venus (which died) */
  39. #define C_PURGE       0x8
  40. int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *);
  41. struct inode *coda_iget(struct super_block *sb, struct ViceFid *fid, struct coda_vattr *attr);
  42. int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
  43. struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb);
  44. void coda_replace_fid(struct inode *, ViceFid *, ViceFid *);
  45. #endif
  46. #endif