nullfs in 4.10

Brian Buchanan bwb at holo.org
Thu Jul 29 23:25:58 PDT 2004


Tim,

I've been experimenting with your nullfs patch for 4-STABLE.  I've found
that I can easily reproduce a bug involving one nullfs mounted inside
another nullfs.  It appears that the null_lock for the vnode representing
the root directory of the interior nullfs does not get released.  Any
subsequent process attempting to traverse into that part of the filesystem
gets stuck waiting in "nullnode".

What I'm doing is:

mount_nullfs -o ro /usr/jail/template /usr/jail/jail1
mount_nullfs -o ro /usr/ports /usr/jail/jail1/usr/ports
head /usr/jail/jail1/usr/ports/Makefile
head /usr/jail/jail1/usr/ports/Makefile
(hangs)

/usr/jail/template contains a fresh FreeBSD distribution.
/usr/ports is NFS-mounted from a remote host.

If instead of the "head ..." stuff, I do a "find /usr/jail/jail1/usr/ports
-type f", the system promptly panics with "draining against myself".
This appears to be due to attempting a LK_DRAIN operation against the root
dir vnode lock that the process still holds.

Unfortunately, due to my inexperience with filesystem locking in FreeBSD,
I haven't been able to determine why the lock isn't being released.  I
just thought I'd provide some feedback in case you're still working on
this.

- B

-- 
Brian Buchanan, CISSP                                         bwb at holo.org
--------------------------------------------------------------------------
FreeBSD - The Power to Serve                        http://www.freebsd.org



More information about the freebsd-stable mailing list