BSD filesystem defragmentation question
    Root Boy Jim 
    rbj at dsys.ncsl.nist.gov
       
    Thu Aug 17 06:36:04 AEST 1989
    
    
  
? From: Chris Torek <chris at mimsy.uucp>
? In article <1886 at marvin.Solbourne.COM> dce at Solbourne.COM (David Elliott)
? writes:
? >OK, let's increase the file size to 10486 bytes, which is 11
? >fragments.
? >
? >At this point, is the data moved on the disk so that my file
? >comprises one block and 3 fragments, or is it left as fragments?
? The file will occupy one block and 3 fragments-within-one-block.
? The exact mechanism by which a fragment expands, or becomes a
? block, depends on which version of 4BSD and on how many blocks
? and fragments are free and on whether the process is `well-behaved'
? when it comes to writing files.  (A well-behaved process writes
? full blocks on full-block boundaries.  This is most common,
? although in 4.2BSD [but not 4.3BSD] /usr/ucb/vi was ill-behaved,
? writing 1K at a time.)
OK, trick question for wizards! How many fragments does a file of
size ((1 << 20) + 1) have? Answer: zero! Only direct blocks are
fragmented! Top of page 208 in the 4.3 book.
Chris, was this true in 4.2 as well?
? In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
? Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris
	Root Boy Jim
	Have GNU, Will Travel.
    
    
More information about the Comp.unix.wizards
mailing list