Subject: Re: mount_mfs (with mount_null) won't reclaim space
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/18/2002 13:58:30
On 18 Mar 2002, enami tsugutomo wrote:

> > Ok. But last time I worked on this code, we did not add layer vnodes to
> > the alias lists. So how is this a problem? Only the lower vnode is in the
> > alias list.
>
> Assume that the lower vnode is ref.'ed in the layer filesystem cache.
>
> And think the case that someone open the lower vnode in the lower
> filesystem directly.  When spec_close is called, it notices someone
> else (== layerfs cache) refering it.

Well, that only fixes half of the problem. The problem is that vcount
doesn't understand layered vnodes. The half that remains is when you have
two file descriptors accessing an upper vnode and one of them calls
close(). The device will get closed even though there is still an active
user.

Fixing vcount() will need the exact same layering interconnect as we will
need to fix removal.

Take care,

Bill