summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/coda_fs_i.h16
-rw-r--r--include/linux/coda_linux.h3
-rw-r--r--include/linux/coda_proc.h27
-rw-r--r--include/linux/coda_psdev.h20
4 files changed, 15 insertions, 51 deletions
diff --git a/include/linux/coda_fs_i.h b/include/linux/coda_fs_i.h
index b47a5c5e1f48..e320452eba6a 100644
--- a/include/linux/coda_fs_i.h
+++ b/include/linux/coda_fs_i.h
@@ -20,13 +20,25 @@ struct coda_inode_info {
struct ViceFid c_fid; /* Coda identifier */
u_short c_flags; /* flags (see below) */
struct list_head c_cilist; /* list of all coda inodes */
- struct file *c_container; /* container file for this cnode */
- unsigned int c_contcount; /* refcount for container file */
+ unsigned int c_mapcount; /* nr of times this inode is mapped */
struct coda_cred c_cached_cred; /* credentials of cached perms */
unsigned int c_cached_perm; /* cached access permissions */
struct inode vfs_inode;
};
+/*
+ * coda fs file private data
+ */
+#define CODA_MAGIC 0xC0DAC0DA
+struct coda_file_info {
+ int cfi_magic; /* magic number */
+ struct file *cfi_container; /* container file for this cnode */
+ unsigned int cfi_mapcount; /* nr of times this file is mapped */
+ struct coda_cred cfi_cred; /* credentials of opener */
+};
+
+#define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data))
+
/* flags */
#define C_VATTR 0x1 /* Validity of vattr in inode */
#define C_FLUSH 0x2 /* used after a flush */
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 0847c29a9175..8efd3734fd7a 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -21,6 +21,7 @@
#include <linux/wait.h>
#include <linux/types.h>
#include <linux/fs.h>
+#include <linux/coda_fs_i.h>
/* operations */
extern struct inode_operations coda_dir_inode_operations;
@@ -45,7 +46,6 @@ int coda_setattr(struct dentry *, struct iattr *);
int coda_isnullfid(ViceFid *fid);
/* global variables */
-extern int coda_access_cache;
extern int coda_fake_statfs;
/* this file: heloers */
@@ -53,7 +53,6 @@ static __inline__ struct ViceFid *coda_i2f(struct inode *);
static __inline__ char *coda_i2s(struct inode *);
static __inline__ void coda_flag_inode(struct inode *, int flag);
char *coda_f2s(ViceFid *f);
-char *coda_f2s2(ViceFid *f);
int coda_isroot(struct inode *i);
int coda_iscontrol(const char *name, size_t length);
diff --git a/include/linux/coda_proc.h b/include/linux/coda_proc.h
index 1f075c1df339..26faac1d91cf 100644
--- a/include/linux/coda_proc.h
+++ b/include/linux/coda_proc.h
@@ -14,7 +14,6 @@
void coda_sysctl_init(void);
void coda_sysctl_clean(void);
-void coda_upcall_stats(int opcode, unsigned long jiffies);
#include <linux/sysctl.h>
#include <linux/coda_fs_i.h>
@@ -23,13 +22,11 @@ void coda_upcall_stats(int opcode, unsigned long jiffies);
/* these four files are presented to show the result of the statistics:
*
* /proc/fs/coda/vfs_stats
- * upcall_stats
* cache_inv_stats
*
* these four files are presented to reset the statistics to 0:
*
* /proc/sys/coda/vfs_stats
- * upcall_stats
* cache_inv_stats
*/
@@ -61,13 +58,6 @@ struct coda_vfs_stats
int readlink;
};
-struct coda_upcall_stats_entry
-{
- int count;
- unsigned long time_sum;
- unsigned long time_squared_sum;
-};
-
/* cache invalidation statistics */
struct coda_cache_inv_stats
{
@@ -83,31 +73,16 @@ struct coda_cache_inv_stats
/* these global variables hold the actual statistics data */
extern struct coda_vfs_stats coda_vfs_stat;
extern struct coda_cache_inv_stats coda_cache_inv_stat;
-extern int coda_upcall_timestamping;
/* reset statistics to 0 */
void reset_coda_vfs_stats( void );
-void reset_coda_upcall_stats( void );
void reset_coda_cache_inv_stats( void );
-/* some utitlities to make it easier for you to do statistics for time */
-void do_time_stats( struct coda_upcall_stats_entry * pentry,
- unsigned long jiffy );
-/*
-double get_time_average( const struct coda_upcall_stats_entry * pentry );
-double get_time_std_deviation( const struct coda_upcall_stats_entry * pentry );
-*/
-unsigned long get_time_average( const struct coda_upcall_stats_entry * pentry );
-unsigned long get_time_std_deviation( const struct coda_upcall_stats_entry * pentry );
-
/* like coda_dointvec, these functions are to be registered in the ctl_table
* data structure for /proc/sys/... files
*/
int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp,
void * buffer, size_t * lenp );
-int do_reset_coda_upcall_stats( ctl_table * table, int write,
- struct file * filp, void * buffer,
- size_t * lenp );
int do_reset_coda_cache_inv_stats( ctl_table * table, int write,
struct file * filp, void * buffer,
size_t * lenp );
@@ -115,8 +90,6 @@ int do_reset_coda_cache_inv_stats( ctl_table * table, int write,
/* these functions are called to form the content of /proc/fs/coda/... files */
int coda_vfs_stats_get_info( char * buffer, char ** start, off_t offset,
int length);
-int coda_upcall_stats_get_info( char * buffer, char ** start, off_t offset,
- int length);
int coda_cache_inv_stats_get_info( char * buffer, char ** start, off_t offset,
int length);
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 1b562e74fa0c..b95aba02c798 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -98,27 +98,7 @@ struct upc_req {
/*
* Statistics
*/
-struct coda_upcallstats {
- int ncalls; /* client requests */
- int nbadcalls; /* upcall failures */
- int reqs[CODA_NCALLS]; /* count of each request */
-} ;
-extern struct coda_upcallstats coda_callstats;
extern struct venus_comm coda_comms[];
-static inline void clstats(int opcode)
-{
- coda_callstats.ncalls++;
- if ( (0 <= opcode) && (opcode <= CODA_NCALLS) )
- coda_callstats.reqs[opcode]++;
- else
- printk("clstats called with bad opcode %d\n", opcode);
-}
-
-static inline void badclstats(void)
-{
- coda_callstats.nbadcalls++;
-}
-
#endif