From owner-freebsd-current Mon Oct 20 01:26:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA08399 for current-outgoing; Mon, 20 Oct 1997 01:26:34 -0700 (PDT) (envelope-from owner-freebsd-current) Received: from schizo.dk.tfs.com (mail.trw.dk [195.8.133.123]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA08345 for ; Mon, 20 Oct 1997 01:26:23 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.dk.tfs.com [140.145.230.252]) by schizo.dk.tfs.com (8.8.7/8.7.3) with ESMTP id KAA08701; Mon, 20 Oct 1997 10:25:51 +0200 (MET DST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.7) with ESMTP id JAA00408; Mon, 20 Oct 1997 09:47:57 +0200 (CEST) To: "John S. Dyson" cc: roberto@keltia.freenix.fr (Ollivier Robert), current@FreeBSD.ORG Subject: Re: nullfs & current In-reply-to: Your message of "Sun, 19 Oct 1997 20:43:01 CDT." <199710200143.UAA05747@dyson.iquest.net> Date: Mon, 20 Oct 1997 09:47:57 +0200 Message-ID: <406.877333677@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In message <199710200143.UAA05747@dyson.iquest.net>, "John S. Dyson" writes: >Ollivier Robert said: >> According to John S. Dyson: >> > The VM system holds a reference. You have to do a vnode_pager_uncache whe >n >> > deleting a file. >> >> Wait... Isn't ufs_remove() supposed to do that ? ufs_remove() is called by >> null_bypass() by an indirect call (VCALL()) and it seemed safe to consider >> that the lower level was supposed to DTR. >> >> Do I have to create a null_remove() function in order to call >> vnode_pager_uncache inside it ? >> >nullfs should really share the VM object with the lower filesystem, but genera >lly >what you say is true, even if you don't share the object. The complexity is >one reason that I haven't fixed it. It IS fixable reasonably though. No, this is wrong. Nullfs can only share the VM object if the permissions are the same, consider a read-only mounted nullfs for instance. calling vnode_pager_uncache() null_remove() would be wrong, the file may still be open. In FFS we only call vnode_pager_uncache in ffs_unmount()... Whatever needs to be done should probably be done in null_inactive(), look at sys/ufs/ufs/ufs_inode.c:ufs_inactive(). -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop."