cvs commit: src/sys/fs/nullfs null.h null_subr.c null_vnops.c

[ Available lists | Index of cvs-src | Month of Jun 2003 | Week of 17 Jun 2003 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Tim J. Robbins <tjr@FreeBSD.org>
Date
17 Jun 2003 01:52:46
Subject
cvs commit: src/sys/fs/nullfs null.h null_subr.c null_vnops.c
Message-ID
200306170852.h5H8qjgg087299@repoman.freebsd.org


[ Hide this part ]
tjr         2003/06/17 01:52:45 PDT

FreeBSD src repository

Modified files:
sys/fs/nullfs null.h null_subr.c null_vnops.c
Log:
MFp4: Fix two bugs causing possible deadlocks or panics, and one nit:
- Emulate lock draining (LK_DRAIN) in null_lock() to avoid deadlocks
when the vnode is being recycled.
- Don't allow null_nodeget() to return a nullfs vnode from the wrong
mount when multiple nullfs's are mounted. It's unclear why these checks
were removed in null_subr.c 1.35, but they are definitely necessary.
Without the checks, trying to unmount a nullfs mount will erroneously
return EBUSY, and forcibly unmounting with -f will cause a panic.
- Bump LOG2_SIZEVNODE up to 8, since vnodes are >256 bytes now. The old
value (7) didn't cause any problems, but made the hash algorithm
suboptimal.

These changes fix nullfs enough that a parallel buildworld succeeds.

Submitted by: tegge (partially; LK_DRAIN)
Tested by: kris

Revision Changes Path
1.19 +2 -0 src/sys/fs/nullfs/null.h
1.41 +36 -9 src/sys/fs/nullfs/null_subr.c
1.63 +57 -4 src/sys/fs/nullfs/null_vnops.c


Elapsed time: 0.187 seconds