Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 1997 20:38:07 +0200
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        current@FreeBSD.ORG
Subject:   Re: nullfs & current UPDATE!
Message-ID:  <19971021203807.51847@keltia.freenix.fr>
In-Reply-To: <406.877333677@critter.freebsd.dk>; from Poul-Henning Kamp on Mon, Oct 20, 1997 at 09:47:57AM %2B0200
References:  <199710200143.UAA05747@dyson.iquest.net> <406.877333677@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
According to Poul-Henning Kamp:
> Whatever needs to be done should probably be done in null_inactive(),
> look at sys/ufs/ufs/ufs_inode.c:ufs_inactive().

By using the following patch, I've been able to create and delete hundreds
of files in a nullfs mounted directory. No vnode leak as far as I can see
from the sysctl debug.numvnodes. fsck reports no missing blocks. No panic,
just works. Now that seems too easy :-)

I know there is a comment in null_inactive() about doing nothing in there
but it seemed logical to inform the lower layer...

PS: a similar problem is in umapfs which is based on nullfs.

Opinions about this ?

Index: null_vnops.c
===================================================================
RCS file: /spare/FreeBSD-current/src/sys/miscfs/nullfs/null_vnops.c,v
retrieving revision 1.24
diff -u -2 -r1.24 null_vnops.c
--- null_vnops.c	1997/10/15 10:04:31	1.24
+++ null_vnops.c	1997/10/21 18:31:52
@@ -534,4 +534,7 @@
 	} */ *ap;
 {
+	struct vnode *vp = ap->a_vp;
+	struct null_node *xp = VTONULL(vp);
+	struct vnode *lowervp = xp->null_lowervp;
 	/*
 	 * Do nothing (and _don't_ bypass).
@@ -546,4 +549,5 @@
 	 * That's too much work for now.
 	 */
+	VOP_INACTIVE(lowervp, ap->a_p);
 	VOP_UNLOCK(ap->a_vp, 0, ap->a_p);
 	return (0);

-- 
Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 3.0-CURRENT #41: Sat Oct 18 18:47:01 CEST 1997



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971021203807.51847>