Subject: Re: nullfs ihash locking?
To: Blair Sadewitz <>
From: Bill Stouder-Studenmund <>
List: current-users
Date: 06/01/2007 11:40:55
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 21, 2007 at 11:17:51PM -0400, Blair Sadewitz wrote:
> Would nullfs be subject to the same problem outlined in PR 36331?  I

Probably. I expect that the nullfs code was copied from the ffs/ufs code=20
way back when. And enhanced with locks in the same way.

> don't know much about the internals of genfs or how the layerfs stuff
> works, but I'm getting what appear to be deadlocks only when using
> mount_null.

layerfs is like genfs but it's only for layered file systems. Back when I=
was adding the overlay fs, I noticed that nullfs and umapfs and overlayfs=
and dmfs (the fs I was working on) all had large blocks of code that were=
almost the same. So I created layerfs and made routines that all of them=20
could share.

Maintaining the hash table for vnodes was one thing that went into
layerfs. They all did almost the same thing. The only difference was a
little bit of work in node creation once we have a new node. Thus there's
a callback in the layerfs node cache code.

> If someone could clue me in, I'd appreciate it.

I hope the above helps.

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.3 (NetBSD)