From owner-freebsd-current Tue Oct 21 11:40:23 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA02548 for current-outgoing; Tue, 21 Oct 1997 11:40:23 -0700 (PDT) (envelope-from owner-freebsd-current) Received: from mexico.brainstorm.eu.org (mexico.brainstorm.fr [193.56.58.253]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA02534 for ; Tue, 21 Oct 1997 11:40:12 -0700 (PDT) (envelope-from roberto@keltia.freenix.fr) Received: from brasil.brainstorm.eu.org (brasil.brainstorm.fr [193.56.58.33]) by mexico.brainstorm.eu.org (8.8.4/8.8.4) with ESMTP id UAA00607 for ; Tue, 21 Oct 1997 20:39:30 +0200 Received: (from uucp@localhost) by brasil.brainstorm.eu.org (8.8.6/brasil-1.2) with UUCP id UAA05658 for current@FreeBSD.ORG; Tue, 21 Oct 1997 20:39:12 +0200 Received: (from roberto@localhost) by keltia.freenix.fr (8.8.7/keltia-2.11/nospam) id UAA00626; Tue, 21 Oct 1997 20:38:08 +0200 (CEST) (envelope-from roberto) Message-ID: <19971021203807.51847@keltia.freenix.fr> Date: Tue, 21 Oct 1997 20:38:07 +0200 From: Ollivier Robert To: current@FreeBSD.ORG Subject: Re: nullfs & current UPDATE! References: <199710200143.UAA05747@dyson.iquest.net> <406.877333677@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <406.877333677@critter.freebsd.dk>; from Poul-Henning Kamp on Mon, Oct 20, 1997 at 09:47:57AM +0200 X-Operating-System: FreeBSD 3.0-CURRENT ctm#3745 AMD-K6 MMX @ 208 MHz Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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