Date: Wed, 15 Sep 1999 08:03:17 +0200 From: Bernd Walter <ticso@cicely.de> To: Terry Lambert <tlambert@primenet.com> Cc: Bernd Walter <ticso@cicely.de>, freebsd-fs@FreeBSD.ORG Subject: Re: FFS-questions Message-ID: <19990915080317.A42200@cicely8.cicely.de> In-Reply-To: <199909142200.PAA22155@usr09.primenet.com>; from Terry Lambert on Tue, Sep 14, 1999 at 10:00:26PM %2B0000 References: <19990912115904.A37697@cicely8.cicely.de> <199909142200.PAA22155@usr09.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 14, 1999 at 10:00:26PM +0000, Terry Lambert wrote: Thank you for explaining the directory specific behavours. During search in the source I got the impression that softlinks uses the di_ib[] array of struct dinode as direct pointers. Is that true or is my impression wrong? > > > Another problem might be the situation if the fs is mounted: > > AFAIK FFS allocates complete blocks (or clusters?) in case > > the file gets bigger. I can't find out if it's a block or a > > couple of frags depending on the ino->di_size. > > This is problematic, because files can be sparse. > > The value of ino->di_size is the file size, in bytes. > > If you take the remainder modulo the physical block size, you > will get the size of the remainder. > > If this value is less than the file system block size minus the > fragment size (4096 - 1024 = 3072), then there are frag(s) involved, > unless it has been truncated back. > That's the way I already do it. My problem was special for the mounted case that the kernel might allocate more than the needed frags but write the real filesize to the inode. It doesn't seem to be a real problem since may need to sync before or use the incore informations anyway. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990915080317.A42200>
