Subject: Re: mount_mfs (with mount_null) won't reclaim space
To: Bill Studenmund <wrstuden@netbsd.org>
From: enami tsugutomo <enami@sm.sony.co.jp>
List: tech-kern
Date: 03/19/2002 10:35:14
Bill Studenmund <wrstuden@netbsd.org> writes:
> > 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.
What case do you imagine for example? Two file descriptor open same
layer fs vnode, or different layer fs vnode on different layer fs
points same lower vnode? Anyway, I don't think lower vnode's usecound
drops before there is actual user.
> Fixing vcount() will need the exact same layering interconnect as we will
> need to fix removal.
Or, make layer fs cache to release lower vnode while it is cached but
not used through the layer fs.
enami.