Subject: Re: mount_mfs (with mount_null) won't reclaim space
To: Jeremy C. Reed <reed@reedmedia.net>
From: Bill Studenmund <wrstuden@wasabisystems.com>
List: tech-kern
Date: 03/16/2002 15:55:27
On Fri, 15 Mar 2002, Jeremy C. Reed wrote:

> > There is an incorrect work around in PR#15555.  No real fix yet.  Some
> > recent discuss with Bill Stuldenmund and me will be found in
> > source-changes.

Enami, I've changed my mind. I still think your fix in that PR isn't
"correct", but it will help in the case where people are using just one
layered file system. Please apply it, perhaps with a "this needs to be
done differently" note. :-)

We do need to fix it "right," but this patch will be no worse than the
current code and will help some folks.

> Thanks for the info. I read this discussion, but it is a little beyond me.

Let me make sure I understand the problem. You make a large file on the
null layer that fills up a noticable amount of space, delete it, and don't
see it disapear. The patch (as I recall it) will fix that. What it won't
fix is say you make the file on the null layer but cd to the underlying
mfs and delete it there. You'll still have the same problem as now. That's
my complaint with it.

To really fix things, we need the leaf layer (mfs/ffs in this case) to
tell all the layers to fully release references when they are done with
the vnode, rather than just putting it on the free list.

> I see your workround is for -current. It (the patches) doesn't work with
> 1.5.3_ALPHA (due to "`vp' undeclared" and new getpages and putpages
> methods).
>
> Would it be okay to apply all these miscfs/genfs/ changes from -current in
> my 1.5.3_ALPHA? (I can manually do this, but I wonder if it will cause
> problems.)
>
> Or is this something that can be officially added to netbsd-1-5?

As I recall the patch (adding a flag to remove so that we vgone the
vnode), it is fine to officially put in 1.5.

Take care,

Bill