diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-12-15 07:49:53 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2013-12-15 07:49:53 +0100 |
commit | 35484945e2f782fe312fcae4f0269b80c4184367 (patch) | |
tree | 8234fe15c638086183f221f8c0082c3357a56347 /sys/src/cmd/exportfs/exportfs.h | |
parent | 7d001bd2b29859744630f8743ce76ba873d66d88 (diff) |
exportfs: get rid of limits, cleanup
get rid of the service buffer limit. keep service buffers
on a global freelist protected by lock.
dont fatal when we hit the process limit. instead, just
abort the rpc with an error.
handle rendezvous() interrupts.
Diffstat (limited to 'sys/src/cmd/exportfs/exportfs.h')
-rw-r--r-- | sys/src/cmd/exportfs/exportfs.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/src/cmd/exportfs/exportfs.h b/sys/src/cmd/exportfs/exportfs.h index 0f7ba3e71..77709d0d9 100644 --- a/sys/src/cmd/exportfs/exportfs.h +++ b/sys/src/cmd/exportfs/exportfs.h @@ -14,12 +14,12 @@ typedef struct Qidtab Qidtab; struct Fsrpc { - int busy; /* Work buffer has pending rpc to service */ + Fsrpc *next; /* freelist */ uintptr pid; /* Pid of slave process executing the rpc */ int canint; /* Interrupt gate */ int flushtag; /* Tag on which to reply to flush */ Fcall work; /* Plan 9 incoming Fcall */ - uchar *buf; /* Data buffer */ + uchar buf[]; /* Data buffer */ }; struct Fid @@ -54,7 +54,7 @@ struct File struct Proc { uintptr pid; - int busy; + Fsrpc *busy; Proc *next; }; @@ -72,7 +72,6 @@ enum { MAXPROC = 50, FHASHSIZE = 64, - Nr_workbufs = 50, Fidchunk = 1000, Npsmpt = 32, Nqidbits = 5, @@ -88,7 +87,6 @@ char Enomem[]; char Emip[]; char Enopsmt[]; -Extern Fsrpc *Workq; Extern int dbg; Extern File *root; Extern File *psmpt; @@ -121,6 +119,7 @@ Fid *getfid(int); int freefid(int); Fid *newfid(int); Fsrpc *getsbuf(void); +void putsbuf(Fsrpc*); void initroot(void); void fatal(char*, ...); char* makepath(File*, char*); |