*BSD News Article 9148


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA5245 ; Tue, 22 Dec 92 17:00:46 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: Dumb Question: Why 512 byte block?
Message-ID: <1992Dec20.025733.155@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: University of Utah Computer Center
References: <1992Dec18.005050.20594@decuac.dec.com> <CGD.92Dec19000739@eden.CS.Berkeley.EDU>
Date: Sun, 20 Dec 92 02:57:33 GMT
Lines: 49

In article <CGD.92Dec19000739@eden.CS.Berkeley.EDU>, cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou) writes:
|> In article <1992Dec18.235623.27538@fcom.cc.utah.edu> terry@cs.weber.edu (A Wizard of Earth C) writes:
|> >You can't split blocks between files.  A block is, by definition, the
|> >smallest possible allocation unit.  Thin about the case where you have
|> >a 1 byte file and a 1 block - 1 byte file; what would you do when
|> >adding one or two characters to the first (1 Byte)?  TReallocate?  Shift
|> >and reallocate for the last byte of the second file?
|> 
|> sorry.  you guys *both* sound confused.  first of all, i've never
|> seen a FFS with 1k blocks; the most "standard" configuration
|> is 4k or 8k blocks, with 8 fragments.
|> 
|> this yields fragments of (obviously) 512bytes and 1k.
|> 
|> you can't split *fragments* between one file.
|> you *can* split blocks between one file, but this tends not to happen,
|> because the FFS doesn't do this unless it's necessary.


I totally mixed up blocks and fragments ...duh!  The original posting was
talking about the "-k" option of the "df" command, and that's why I was
thinking of blocks (ie: "512-blks").

While I was looking at the du output:

    hecate 1 % df
    Filesystem        512-blks    used   avail capacity  Mounted on
    /dev/wd0a           591200  437684   94396    82%    /
    icarus:/home       1192464 1133390   35226    97%    /icarus
    einstein.att:/dsk2 2547712 1887656  410872    82%    /X11R4
    hecate 2 %

I should have thought about the fsck, which reports _fragmentation_ of the
file system.

I had been working for some time on a SVR4 UFS implementation, and I fear my
wheels were still jarred loose at the time I posted.  ;-).


					Terry Lambert
					terry@icarus.weber.edu
					terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------