M gnot/main.c => gnot/main.c +3 -3
@@ 246,9 246,9 @@ confinit(void)
conf.npgenv = 200;
conf.nmtab = 50;
conf.nmount = 100;
- conf.nmntdev = 5;
- conf.nmntbuf = 10;
- conf.nmnthdr = 10;
+ conf.nmntdev = 10;
+ conf.nmntbuf = 20;
+ conf.nmnthdr = 20;
conf.nstream = 64;
conf.nqueue = 5 * conf.nstream;
conf.nblock = 12 * conf.nstream;
M port/devbit.c => port/devbit.c +3 -2
@@ 191,9 191,10 @@ bitopen(Chan *c, int omode)
}
bit.lastid = -1;
bit.init = 1;
+ bit.ref = 1;
unlock(&bit);
+ }else
incref(&bit);
- }
c->mode = openmode(omode);
c->flag |= COPEN;
c->offset = 0;
@@ 224,7 225,7 @@ bitclose(Chan *c)
int i;
Bitmap *bp;
- if(c->qid != CHDIR){
+ if(c->qid!=CHDIR && (c->flag&COPEN)){
lock(&bit);
if(--bit.ref == 0){
for(i=1,bp=&bit.map[1]; i<conf.nbitmap; i++,bp++)