From owner-freebsd-current Sun Oct 19 06:35:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA06773 for current-outgoing; Sun, 19 Oct 1997 06:35:01 -0700 (PDT) (envelope-from owner-freebsd-current) Received: from mexico.brainstorm.eu.org (root@mexico.brainstorm.fr [193.56.58.253]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA06759 for ; Sun, 19 Oct 1997 06:34:57 -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 PAA25525 for ; Sun, 19 Oct 1997 15:35:05 +0200 Received: (from uucp@localhost) by brasil.brainstorm.eu.org (8.8.6/brasil-1.2) with UUCP id PAA22998 for current@FreeBSD.ORG; Sun, 19 Oct 1997 15:34:35 +0200 Received: (from roberto@localhost) by keltia.freenix.fr (8.8.7/keltia-2.11/nospam) id PAA00323; Sun, 19 Oct 1997 15:33:26 +0200 (CEST) (envelope-from roberto) Message-ID: <19971019153325.26490@keltia.freenix.fr> Date: Sun, 19 Oct 1997 15:33:25 +0200 From: Ollivier Robert To: FreeBSD-Current Subject: Re: nullfs & current References: <645.877092309@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <645.877092309@critter.freebsd.dk>; from Poul-Henning Kamp on Fri, Oct 17, 1997 at 02:45:09PM +0200 X-Operating-System: FreeBSD 3.0-CURRENT ctm#3728 AMD-K6 MMX @ 208 MHz Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk According to Poul-Henning Kamp: > Seriously, this should be the simplest layered filesystem possible, so > unless we can get that to work there is no hope for the rest of them, > so I hope somebody will spend some time on it. I made a similar experiment and the space is not reclaimed till the real filesystem is unmounted. 383 [22:16] root@keltia:ftp/pub# fsck -n /dev/rsd11a ** /dev/rsd11a (NO WRITE) ** Last Mounted on /x ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts UNREF FILE I=15366 OWNER=roberto MODE=100644 SIZE=2380000 MTIME=Oct 17 22:13 1997 CLEAR? no UNREF FILE I=15428 OWNER=roberto MODE=100644 SIZE=4000 MTIME=Oct 17 22:13 1997 CLEAR? no ** Phase 5 - Check Cyl groups CLEAN FLAG NOT SET IN SUPERBLOCK FIX? no 5891 files, 605968 used, 31894 free (2550 frags, 3668 blocks, 0.4% fragmentation) The two files are the one I created. Now my FS is at 1 block free even though more than 2 MB are free. Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/sd11a 637862 605968 1 100% /x /x/ftp/pub 637862 605968 1 100% /sources /work/spare 851149 410611 372447 52% /sources/incoming I'm trying to read the source but I'm not very experienced with vnodes/VFS and such. After studying the code, we have unlink VOP_REMOVE null_bypass ufs_remove ufs_remove does remove the file from the directory but the refcount is still probably at one somewhere so the blocks are not reclaimed till umount time. I don't know where to look at now. I'll have to read more about the whole VFS/vnode business. It is too bad I don't have a second machine to use remote gdb... -- Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #36: Sat Oct 4 19:58:34 CEST 1997