tjr 2003/06/17 01:52:45 PDT
FreeBSD src repository
sys/fs/nullfs null.h null_subr.c null_vnops.c
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
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