summaryrefslogtreecommitdiffstats
path: root/include/linux/coda_psdev.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /include/linux/coda_psdev.h
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'include/linux/coda_psdev.h')
-rw-r--r--include/linux/coda_psdev.h65
1 files changed, 27 insertions, 38 deletions
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 7b827e8c3..2de8ff1ff 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -4,16 +4,8 @@
#define CODA_PSDEV_MAJOR 67
#define MAX_CODADEVS 5 /* how many do we allow */
-extern struct vcomm psdev_vcomm[];
-
-/* queue stuff; the rest is static to psdev.c */
-struct queue {
- struct queue *forw, *back;
-};
-void coda_q_insert(struct queue *el, struct queue *q);
-void coda_q_remove(struct queue *q);
-
-
+extern struct venus_comm coda_upc_comm;
+extern struct coda_sb_info coda_super_info;
#define CODA_SUPER_MAGIC 0x73757245
struct coda_sb_info
@@ -21,31 +13,23 @@ struct coda_sb_info
struct inode * sbi_psdev; /* /dev/cfs? Venus/kernel device */
struct inode * sbi_ctlcp; /* control magic file */
int sbi_refct;
- struct vcomm * sbi_vcomm;
+ struct venus_comm * sbi_vcomm;
struct inode * sbi_root;
+ struct super_block *sbi_sb;
struct list_head sbi_cchead;
struct list_head sbi_volroothead;
};
-/* communication pending/processing queues queues */
-struct vcomm {
+/* communication pending/processing queues */
+struct venus_comm {
u_long vc_seq;
struct wait_queue *vc_waitq; /* Venus wait queue */
- struct queue vc_pending;
- struct queue vc_processing;
- struct super_block *vc_sb;
+ struct list_head vc_pending;
+ struct list_head vc_processing;
int vc_inuse;
+ pid_t vc_pid; /* Venus pid */
};
-static inline int vcomm_open(struct vcomm *vcp)
-{
- return ((vcp)->vc_pending.forw != NULL);
-}
-
-static inline void mark_vcomm_closed(struct vcomm *vcp)
-{
- (vcp)->vc_pending.forw = NULL;
-}
static inline struct coda_sb_info *coda_sbp(struct super_block *sb)
{
@@ -67,7 +51,8 @@ int venus_setattr(struct super_block *, struct ViceFid *,
int venus_lookup(struct super_block *sb, struct ViceFid *fid,
const char *name, int length, int *type,
struct ViceFid *resfid);
-int venus_release(struct super_block *sb, struct ViceFid *fid, int flags);
+int venus_release(struct super_block *sb, struct ViceFid *fid, int flags,
+ struct coda_cred *);
int venus_open(struct super_block *sb, struct ViceFid *fid,
int flags, ino_t *ino, dev_t *dev);
int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid,
@@ -100,18 +85,22 @@ int venus_fsync(struct super_block *sb, struct ViceFid *fid);
/* messages between coda filesystem in kernel and Venus */
extern int coda_hard;
extern unsigned long coda_timeout;
-struct vmsg {
- struct queue vm_chain;
- caddr_t vm_data;
- u_short vm_flags;
- u_short vm_inSize; /* Size is at most 5000 bytes */
- u_short vm_outSize;
- u_short vm_opcode; /* copied from data to save lookup */
- int vm_unique;
- struct wait_queue *vm_sleep; /* process' wait queue */
- unsigned long vm_posttime;
+struct upc_req {
+ struct list_head uc_chain;
+ caddr_t uc_data;
+ u_short uc_flags;
+ u_short uc_inSize; /* Size is at most 5000 bytes */
+ u_short uc_outSize;
+ u_short uc_opcode; /* copied from data to save lookup */
+ int uc_unique;
+ struct wait_queue *uc_sleep; /* process' wait queue */
+ unsigned long uc_posttime;
};
+#define REQ_ASYNC 0x1
+#define REQ_READ 0x2
+#define REQ_WRITE 0x4
+
/*
* Statistics
@@ -119,7 +108,7 @@ struct vmsg {
struct coda_upcallstats {
int ncalls; /* client requests */
int nbadcalls; /* upcall failures */
- int reqs[CFS_NCALLS]; /* count of each request */
+ int reqs[CODA_NCALLS]; /* count of each request */
} ;
extern struct coda_upcallstats coda_callstats;
@@ -127,7 +116,7 @@ extern struct coda_upcallstats coda_callstats;
static inline void clstats(int opcode)
{
coda_callstats.ncalls++;
- if ( (0 <= opcode) && (opcode <= CFS_NCALLS) )
+ if ( (0 <= opcode) && (opcode <= CODA_NCALLS) )
coda_callstats.reqs[opcode]++;
else
printk("clstats called with bad opcode %d\n", opcode);