Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Oct 1997 15:33:25 +0200
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        FreeBSD-Current <current@FreeBSD.ORG>
Subject:   Re: nullfs & current
Message-ID:  <19971019153325.26490@keltia.freenix.fr>
In-Reply-To: <645.877092309@critter.freebsd.dk>; from Poul-Henning Kamp on Fri, Oct 17, 1997 at 02:45:09PM %2B0200
References:  <Pine.BSF.3.95.971017125539.624A-100000@totum.plaut.de> <645.877092309@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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