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