[comp.unix.wizards] lost+found

chris@mimsy.UUCP (Chris Torek) (08/17/87)

In article <561@murphy.UUCP> dave@murphy.UUCP (Dave Cornutt) writes:
>Mkdir by itself isn't sufficient.

(Unless your fsck can create directory space.  Even if it can,
preallocated space is safer, given that fsck is working on a
potentially broken file system.)

>Now, here's my question: I've seen several postings here saying that BSD4.3
>is capable of shrinking directories.  In that case, if I create a bunch
>of files in a lost+found directory and then delete them, what's to stop
>it from shrinking the directory and undoing the effect?

A directory is truncated iff namei discovers empty slots at the end
while creating a new name (to do which it must scan the entire directory
anyway).  Directories are not truncated when namei is removing an
entry.  [Quibble: namei itself does not do the removing.  Nonetheless
it is given the reason for the name lookup.]
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
Domain:	chris@mimsy.umd.edu	Path:	seismo!mimsy!chris