limit clunk queue length for cclose()
dont let the clunk queue grow too large if we are allowed to block (cclose) as the fileserver might run out of fids.
This commit is contained in:
parent
52f71a17da
commit
6f1efd37a2
1 changed files with 4 additions and 3 deletions
|
@ -476,8 +476,8 @@ chanfree(Chan *c)
|
|||
struct {
|
||||
Chan *head;
|
||||
Chan *tail;
|
||||
int nqueued;
|
||||
int nclosed;
|
||||
ulong nqueued;
|
||||
ulong nclosed;
|
||||
Lock l;
|
||||
QLock q;
|
||||
Rendez r;
|
||||
|
@ -555,7 +555,8 @@ cclose(Chan *c)
|
|||
|
||||
if(devtab[c->type]->dc == L'M')
|
||||
if((c->flag&(CRCLOSE|CCACHE)) == CCACHE)
|
||||
if((c->qid.type&(QTEXCL|QTMOUNT|QTAUTH)) == 0){
|
||||
if((c->qid.type&(QTEXCL|QTMOUNT|QTAUTH)) == 0)
|
||||
if((clunkq.nqueued - clunkq.nclosed) < 64){
|
||||
closechanq(c);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue